Sea Turtle

He follows the mouse!

This is a simple example combining 2D perspective transformations, matrix mu transformations, parametric surfaces, and hierarchical shapes.
The bottom plane is modulated using the Noise function, to give it a sandy, underwater feeling. The top plane is also modulated by time and a sin() function to give the appearance of the ocean surface.

The turtle's motion is determined by its velocity vector, which always points towards the cursor, and its body is rotated so that it face the direction of the velocity vector.
Since the cursor z position is 0, and the turtle is in the negative Z area, it always looks towards the camera. (The z coordinate of the velocity is ignored when calculating its position, otherwise it "swims" towards the camera until the perspective causes it to "blow up").