Elements of Graphics: Assignment Two
Due Midnight, Tues. Sept 23
This assignment should familiarize you with changing the attributes of
objects and other basic two dimensional operations. You will start with
your program from the previous assignment, and modify it as follows to create
a new class, NewAmoeba which, like Amoeba, extends ApplicationFrame.
- Use thicker lines and different colors for the border of the amoeba and
nucleus.
- Use a color gradient to fill the nucleus.
- Break the initial boundary up into more curves so that
the amoeba can take on more complicated shapes.
- Approximate collision detection: check to make
sure that the amoeba does not intersect the rectangle around the
nucleus, by using the Shape.contains(Rectangle r) method of the
amoeba. If this returns true, do not allow the motion.
Turn in the files NewAmoeba2.java and README2 using turnin. Don't
turn in ApplicationFrame.java again if you haven't modified it.
Don Fussell