mirror of
https://github.com/dyne/FreeJ.git
synced 2026-02-05 12:39:15 +01:00
processing-js 0.4 has been merged in some relevant parts basic and topic scripts added for test color handling fixed, more scripts show up now
40 lines
552 B
Plaintext
40 lines
552 B
Plaintext
float spin = 0.0;
|
|
float diameter = 84.0;
|
|
float angle;
|
|
|
|
float angle_rot;
|
|
int rad_points = 90;
|
|
|
|
void setup()
|
|
{
|
|
size(200, 200);
|
|
noStroke();
|
|
smooth();
|
|
}
|
|
|
|
void draw()
|
|
{
|
|
background(153);
|
|
|
|
translate(130, 65);
|
|
|
|
fill(255);
|
|
ellipse(0, 0, 16, 16);
|
|
|
|
angle_rot = 0;
|
|
fill(51);
|
|
|
|
for(int i=0; i<5; i++) {
|
|
pushMatrix();
|
|
rotate(angle_rot + -45);
|
|
ellipse(-116, 0, diameter, diameter);
|
|
popMatrix();
|
|
angle_rot += PI*2/5;
|
|
}
|
|
|
|
diameter = 34 * sin(angle) + 168;
|
|
|
|
angle += 0.02;
|
|
if (angle > TWO_PI) { angle = 0; }
|
|
}
|