Introductory Trail

This trail is meant for new students, or students who are looking for simple explanations of the content materials. Each section in here will also contain links to the appropriate sections in the advanced and programming sections.

Rotation

Definition
A rotation is a transformation that causes a point p to be moved relative to a central point, without changing the distance of p from the central point. By convention, this central point is the origin of the coordinate system - the point (0,0).

Specifying a Rotation
A rotation is generally specified by providing a single number that indicates how many degrees the point should be rotated by. The number can be either positive or negative. In the coordinate system we are using, a positive number of degrees indicates a counter-clockwise turn.

Undo'ing a Rotation
If you have rotated an object by X degrees, and you want to undo this, you need to rotate the object again by -X degrees.

Example
The example below shows a rotation of 90 degrees. Since this is a positive rotation, the rotation is counter-clockwise (in the coordinate system that we are using). Also, 4 rotations of 90 degrees totals 360 degrees, and thus the object returns back to the original position.

Back Introductory Trail Next


Index Advanced Trail Programmer's Trail Game