I do not know of any (or I would have posted links in my Ruby Resources lists.)
The Animation
class overview itself has a simple example.
Did you search this forum category?
The Camera
class introduction has a snippet showing setting the view to a new camera.
But you would most likely use Camera#set
to change the model.active_view
camera “on the fly”.
This exercise is not very difficult at all. The camera’s up vector and target are likely to remain the same.
It is only the camera eye position that will change. Changing it is dead simple using a rotational transformation.
(Ie, a Geom::Point3d
object can be transformed via Geom::Point3d#transform!
.)
First you write an outline of the steps (called pseudocode,) breaking the challenge down into small chunks. Then solve each chunk. Often each chunk will become a method (aka a function.)
What is it specifically that has you stumped ?