VRML World
Model Templates: FSM = Finite State Machine
Overview: Since the holiday season was fast approaching, I decided to do
a simple finite state machine that showed the two main holidays in the Christian
calendar, Christmas and Easter. The world starts out in the Christmas state,
and once clicked, moves into the Easter state. The states are shown by two
ways:
When a state is entered, music is played which relates to the state.
When a state is active, an object in the state begins to change
color, following the CMY color pattern back and forth.
Animation: The salient feature in this FSM is not so much the visual aspect,
but the idea behind the animation. As opposed to just randomly deciding to
change from cyan to magenta to yellow and back, I instead wrote the script
such that each value of the rgb color array would be incremented and then
decremented from 0 to 1 and back to 0. This increment and decrement variable
would move in between the r, g, and b values, changing them as it went along.
I originally thought this might produce a rainbow effect, but instead was
pleased to see that it created the CMY color gambut.