Subscribed unsubscribe Subscribe Subscribe

007_for_loop

crate spiral (sin,cos)

color mode
clr(r,g,b,alpha)
hsb(h,s,b,alpha)

import processing.opengl.*;
import igeo.*;

int r = 30; // radius

size(960,720,IG.GL);

for (int i=0; i<100; i++){
  new IPoint(sin(i*0.5)*r,cos(i*0.5)*r,i*5).clr(i*0.01,0,1-i*0.01);
  new IPoint(sin(i*0.5)*r+(3*r),cos(i*0.5)*r,i*5).hsb(i*0.01,1,1);
}