I’m trying to get a better understanding on how Dan Shiffman drew his raindrop shape via the variables below AND the starting y position.
Any help is most appreciated!
Text in bold placed next to the 3 areas in question.
class Drop{
float x, y;
float speed;
color c;
float r;
Drop(){
r = 8;
x = random(width);
y = -r*4;
for y above, does this mean -8*4 is: y = -32?
speed = random(1, 5);
c = color(50, 100, 150);
}
void move(){
y += speed;
}
In the move() function, with the y set at -32 that becomes -32 += speed?
I think my interpretation of y must be wrong?
```
void display(){
fill(c);
noStroke();
for (int i = 2; i < r; i++){
ellipse(x, y+i*4, i*2, i*2);
}
}
**And finally, in ellipse, for y position and w, h: **
**1/ how do you get the raindrop shape if both w and h are the same variable **
2/ i’m not fully understanding the y position calculation