The following are a two samples are created using CyberToolbox. The
samples are distributed with a CyberToolbox download package.
Earth and Moon
The sample has two objects, a earth and a moon. The earth is
rotated around the midpoint, the moon is rotated in the earth.

The earth behavior's diagram is given bellow. The diagram is executed when
the frame event happen, an the earth is rotated around a y-axis in the
world using the frame number.

The diagram of the moon behavior is given bellow. The diagram is executed
when the frame event happen, and the moon is moved around the earth using
the frame number.

Clock
The sample show current system time using 3D objects.

The diagram of the clock behavior is given bellow. The diagram is executed
when the frame event happen, and the clock objects are rotated around z-axis
in the world from current system time.

The rotation angles of clock objects are caluculated in the diagram using
modules as:
csHour = current system hour
csMinute = current system minute
csSecond = current system second
clockHour angle = (-30 * csHour) - (csMinute / 2) - (csSecond
/ 120)
clockMin angle = (-6 * csMinute) - (csSecond / 10)
clockSec angle = (-6 * csSecond)
|