Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

rundom numbers

$
0
0

Hello! i need help

As I can make random numbers? I put in the code: 0.0.0.0.0.0.0.0 I would like that every time you click the mouse do the numbers change their random manner.

For example: 10.40.57.05.02.09.45.66

the code:

void setup(){ // Initilaize the sketch size(600,400);

// VERY IMPORTANT: Allways initialize the library in the setup RG.init(this);

// Choice of colors background(0); fill(0,0,255); noStroke();

// Load the font file we want to use (the file must be in the data folder in the sketch floder), with the size 60 and the alignment CENTER grp = RG.getText("Bézier(0,0,0,0,0,0,0,0)", "FreeSans.ttf", 50, CENTER); }

void draw(){ // Clean frame background(0);

// Set the origin to draw in the middle of the sketch translate(width/2, height/2);

// Draw the string "Bézier" on the PGraphics canvas g (which is the default canvas of the sketch)
grp.draw(); }


Viewing all articles
Browse latest Browse all 2896

Trending Articles