The most basic object you could implement is a "face" made up
of circles and triangles, for example:
A more complicated shape could be -->
<-- Or maybe something like this
Especially with an object like the last one you wouldn't start out with
that many features, but with a simpler shape, and you would add
features as you go along.
Generally speaking, something should happen when two shapes intersect. In particular, a shape should change its generation (either up or down, depending on the rules you set for this).
For example, a generation 2 version of the face has a smaller version
of the face in one of the eyes. That is, the eye now serves as the face with
two eyes and a mouth inside -->
<-- A generation 3 version of the face has a smaller version of the face
in each of the eyes.
The key issue here is that it should be possible for a basic shape to
reappear in higher generation versions of itself.
Collision rules
If two shapes collide, each changes its generation by one.
The objects obey the laws of physics, conservation of energy
and momentum (you can assume objects are circular in shape even
if they're not, and you can assume all objects have equal
mass or have mass increase with the generation).
If a shape collides with a wall, it bounces back with the same velocity and reflected direction.
You (the two of you) are to write all code yourself for this assignment. You can build upon Tcl/Tk or OpenGL scaffolding provided in previous assignments but we will provide no shell for you.
Your world will evolve in a rectangular window. The user must be allowed to change the size of the window in standard fashion. You must provide a user interface that allows the user to add new shapes to a scene.
Every shape starts at generation 1 and is always of the same size. The user places it by a mouse click and also gives it a velocity with magnitude and direction. The shape moves with this velocity until it either hits another face or hits a wall.
If you implement the assignment described so far for the "face" shape,
you score 8 out of 10.
Extra credit suggestions are:
But seriously: