Last active
August 29, 2015 14:18
-
-
Save clavis-magna/42fe43e5f7ef0291596b to your computer and use it in GitHub Desktop.
draw a raindrop shape in processing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup(){ | |
size(500,500); | |
} | |
void draw(){ | |
//draw a drop at 120, 120 size 8 | |
drawRaindrop(120,120,8); | |
} | |
//draw raindrop x = x position, y = y positiom, size = size | |
void drawRaindrop(int x,int y,int size){ | |
noStroke(); | |
for (int i = 2; i < size; i++ ) { | |
ellipse(x,y + i*4,i*2,i*2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This uses the technique from the example linked below to draw a raindrop shape using a series of ellipses that increase slightly in size and are positioned overlapping but slightly below one another.
http://www.learningprocessing.com/examples/chapter-10/example-10-10/