Skip to content

Instantly share code, notes, and snippets.

@koji
Created October 12, 2016 03:53
Show Gist options
  • Save koji/e6d7148a789ddc25edcbc08155c81d23 to your computer and use it in GitHub Desktop.
Save koji/e6d7148a789ddc25edcbc08155c81d23 to your computer and use it in GitHub Desktop.
function setup() {
createCanvas(720,480);
strokeWeight(2);
ellipseMode(RADIUS);
}
function draw() {
background(204);
// neck
stroke(102);
line(266,257,266,162);
line(276,257,276,162);
line(286,257,286,162);
// antennae
line(276,155,246,112);
line(276,155,306,56);
line(276,155,342,170);
// body
noStroke();
ellipse(264,377,33,33);
fill(0);
rect(219,257,90,120);
fill(102);
rect(219,274,90,6);
// head
fill(0);
ellipse(276,155,45,45);
fill(255);
ellipse(288,150,14,14);
fill(0);
ellipse(288,150,3,3);
fill(153);
ellipse(263,148,5,5);
ellipse(296,130,4,4);
ellipse(305,162,3,3);
}
@koji
Copy link
Author

koji commented Oct 12, 2016

Getting Started with p5.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment