If you want to avoid a ’Missing Assignments“ report,
turn in
Making a face solution today.
A look at Processing/Java control structure with
Adam Whitley’s slides
Just a little bit more Java-ish Processing
Eclipse homework from 2017
Write a simple animation of a solar eclipse.
Use a wide window, say 1000×200.
The two objects in your animation, sun and moon, will move from left
to right at slightly different speeds. The background of your
window represents the sky.
The moon should be a tiny bit bigger than the sun but move a little faster.
The sun gets a head start, but the moon should be directly in
front of the sun when both are at the center of the windows.
Of course, the background get darker as the moon blocks more of the sun.
If you want to see a real formula for determining how
much darker, look at
Wolfram Mathworld’s
formula for
Circle-Circle Intersection.
Doing more and more
Work on some of these.
-
Draw a ball that bounces around a box. Assume there is no friction.
-
Animate a ball that bounces straight up-and-down,
but assume gravity exists! (However, still no air friction.)
-
Make a lame game. Every time the mouse is pressed on the ball,
it changes color. I suggest using the HSB color model.