width
and height
should not be the same)draw()
function:()
draws the background for the
sketch which could include a background()
function call but
should additionally implement coding that creates a background
(no PImage
objects)
()
there is no movement in this
function, just draw the object at the current x- and y-coordinate
locations; you might consider renaming this function to reflect
whatever object you are drawing (for example if your object is a
dog, the function could be called drawDog()
)
()
the object should move both
horizontally and vertically as well; in this function add the current
values of the x and y 'speed' variables to the x- and y-coordinate
variables (you also could rename this function to reflect whatever
object you are drawing)
()
when the object reaches
any of the output window borders it should reverse direction;
in this function reverse the polarity of the 'speed' variables
so that when the object reaches the left or right border, it should
change direction horizontally and when it reaches the top or bottom
border, it should change direction vertically (you also could
rename this function to reflect whatever object you are drawing)
The "modularized" approach above is the central part of this assignment and you will receive minimal credit if you do not complete the project using this specific methodology