xxxxxxxxxx
//egg script by Formo , mathematic solution by "Moss Egg" Robert Dixon , Mathographic
import processing.pdf.*;
void setup() {
size (800, 800);
smooth();
frameRate(2);
}
void draw () {
background(255);
egg(200);
}
void egg(float x) {
//ellipse egg constructor
strokeWeight (3);
stroke(0, 100);
//egg
arc(width/2, height/2, 2*x, 2*x, 0, PI);
arc(width/2-x, height/2, 4*x, 4*x, 7*PI*.25, 2*PI);
arc(width/2+x, height/2, 4*x, 4*x, PI, 5*PI*.25);
arc(width/2, height/2-x, (((2*x *sin (radians (45)))-x)/ sin (radians (45)))*2, (((2*x *sin (radians (45)))-x)/ sin (radians (45)))*2, 5*PI*.25, 7*PI*.25 );
}