From 2343e965ed72b33d4900a10dc6023bb0ddd42435 Mon Sep 17 00:00:00 2001 From: Vinay Varma Date: Fri, 27 Oct 2017 15:07:27 +0530 Subject: [PATCH] added my JS project Beautiful butterfly --- Butterfly.html | 14 +++++++++++++ Butterfly.js | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 Butterfly.html create mode 100644 Butterfly.js diff --git a/Butterfly.html b/Butterfly.html new file mode 100644 index 0000000..5f3d133 --- /dev/null +++ b/Butterfly.html @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Butterfly.js b/Butterfly.js new file mode 100644 index 0000000..65e4a0b --- /dev/null +++ b/Butterfly.js @@ -0,0 +1,54 @@ +var yoff=0; +var q=1; +var z=1; +var j=91; +function setup(){ + createCanvas(windowWidth,windowHeight); + frameRate(25); + +} +function draw(){ + translate(width/2,height/2); + + rotate(PI/2); + background(0); + stroke(225); + strokeWeight(3); + beginShape(); + var xoff =0; + dx=0.02; + for(var l=0;l<10;l++) + { + for(var a=-PI/2;a