We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, I'm a newbie so sorry if I don't have all of the language. I have to use for, is and else for my school work. I have 4 rect in 4 different places in my drawing. I would like for them to grow like a stem of a flower. I'm stuck, this is what I used.
function stem(coordX,coordY){
fill("green");
rect(coordX,coordY, 30, 120);
for(i=coordX,coordY;i<=120;i=i+15){
stem(i);
}//fin de for
}//fin stem
function draw() {
stem(1200,1200);
stem(640,1200);
stem(400,1200);
stem(2000,1200);
}
you can see it here:https://www.openprocessing.org/sketch/449048
Thank you
Answers
edit post, highlight code, press ctrl-o to format.
Thanks
It's probably if not is.....
Re:
for
,if
,else
-- https://processing.org/reference/if.htmlDo you mean that you want the coordinates of each rect to change, based on a stemheight variable?
Chrisir, thanks it was a typo. Jeremydouglass. i will try this thank you.