Hi everyone, I would really appreciate the help trying to figure out this code. I have been working at it for hours and I haven’t gotten any progress on it at all. I hope that you are able to help in any kind of way. The image below is supposed to be the outcome of the code. Thank you
No, I didn’t write the code it was given to me like that from my teacher. I put the underscores there to signify the empty space. I have tried input the x,y, s, angle, and alpha to the translate, rotate, and scale but it didn’t work and I am confused about the DrawFlower(); part on what to put in there.
As you can see, the function name is DrawFlower and some numbers are passed to it (which are then stored in variables (that are known within the function))
here you mean the line DrawFlower( _ , _ , _ , _ , _ );
in the function draw() where we actually call (use) the function DrawFlower.
Now, we want to pass the parameters to the function that the function wants to hear.
(what we write here: DrawFlower( _ , _ , _ , _ , _ ); must match this: void DrawFlower(float x, float y, float s, float angle, float alpha) )
We start with (check definition of function DrawFlower(float x, float y, …) ) x,y, which is the position, so we want to pass the position. Let’s use the center of the screen.