Struggling to understand loops, trying to give an oval a gradient.
in
Programming Questions
•
8 months ago
Hey guys, first, I'm going to give solving the issue myself a try. If I still can't figure that out, I'll ask about the gradient in an oval.
I have the following code;
- float wCercle;
- float hCercle;
- void setup(){
- size(400,400);
- smooth();
- frameRate(30);
- // bunch of irrelevant code here.
- wCercle = 163;
- hCercle = 192;
- }
- void draw(){
- background(255);
- // bunch of irrelevant code here.
- fill(0);
- for (int i = 0; i < 100; i = i + 10) {
- text("wCercle = "+wCercle+" - hCercle = "+hCercle, 0, i);
- wCercle = wCercle - i;
- }
- }
Thanks.
1