Stop
Continue
Go
/* Drawing shapes around a circle. This example draws a line segment and a triangle repeatedly around a circle using the rotate transform and a for loop. */ function setup(){ //translate to the center of the canvas translate(200,200); } function draw(){ //variables for the angle to which we will rotate var angle; //Let angle take the values 20, 40,... up to 360 //Play wth the number 20 here to see the results for (angle=0;angle<360;angle=angle+20){ //save the graphics state so that transformations //do not accumulate save(); //rotate angle rotate(angle); //draw our shape pointing straight down line(0,0,0,200); triangle(0,200,10,185,-10,185); fill(); //restore the graphics state to undo transforms restore(); } }
default
3024-day
3024-night
ambiance
base16-dark
base16-light
blackboard
cobalt
eclipse
elegant
erlang-dark
lesser-dark
mbo
mdn-like
midnight
monokai
neat
night
paraiso-dark
paraiso-light
pastel-on-dark
rubyblue
solarized dark
solarized light
the-matrix
tomorrow-night-eighties
twilight
vibrant-ink
xq-dark
xq-light