the code is this, i am new in this processing... i wanna know how to make smaller same moving circle? inside it.. this is the code
final static short SEGMENTS = 100;
final static float ANGLE_PER_SEGMENT = TWO_PI / SEGMENTS;
final static short INNER_RADIUS = 100;
final static float RADIUS_VARIATION = 100;
final static float NOISE_SCALE = .5;
void setup() {
size(500, 500);
smooth();
frameRate(50);
strokeWeight(4);
}
PVector PointForIndex(int i) {
float angle = ANGLE_PER_SEGMENT * i;
float cosAngle = cos(angle);
float sinAngle = sin(angle);
float time = frameCount * 1e-2;
float noiseValue = noise(NOISE_SCALE*cosAngle + NOISE_SCALE,
NOISE_SCALE*sinAngle + NOISE_SCALE, time);
float radius = INNER_RADIUS + RADIUS_VARIATION*noiseValue;
return new PVector(radius*cosAngle, radius*sinAngle);
}
void draw() {
background(-1);
translate(width >> 1, height >> 1);
for (int i = 0; i != SEGMENTS;) {
PVector p0 = PointForIndex(i);
PVector p1 = PointForIndex(++i);
line(p0.x, p0.y, p1.x, p1.y);
}
}
1