Stop
Continue
Go
/* Random Path Example This example uses motion to mark 50 steps along a path in which the direction/angle of each step is random. To choose a random direction, we choose a random angle. We then take a step with vx=COS(angle) ad vy=SIN(angle). */ function setup(){ //no special setup needed } function draw(){ var x,y; //coordinates var vx,vy; //velocity var angle; //angle/direction var i; //index //start in middle of screen x=width/2; y=height/2; //draw 500 steps of path for (i=0;i<500;i++){ fillrect(x,y,1,1); //update velocity angle=random()*360; vx=COS(angle); vy=SIN(angle); //update position x=x+vx; y=y+vy; } }
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