Stop
Continue
Go
/* Snowflake Example This example draws a snowflake by drawing reflections of 10 random line segments. */ function setup(){ //translate to center of canvas translate(width/2, height/2); } function draw(){ var x1, y1, x2, y2; //coordinates var i; //index to count segments for(i=0;i<10;i++){ x1=random()*width/2; //x1 random y1=random()*x1; //y1 less than x1 x2=random()*width/2; //x2 random y2=random()*x2; //y2 less than x2 //Copies of segment in each quadrant line(x1,y1,x2,y2); //Quadrant 1 line(-x1,y1,-x2,y2); //Q2 line(x1,-y1,x2,-y2); //Q4 line(-x1,-y1,-x2,-y2); //Q3 //Reflections of the above segements line(y1,x1,y2,x2); //Q1 line(-y1,x1,-y2,x2); //Q2 line(y1,-x1,y2,-x2); //Q4 line(-y1,-x1,-y2,-x2); //Q3 } }
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