IBMImagesFlipping
IBMImagesFlipping.mp4
Description
An ImageTexture on a Rectangle, Circle, IndexedFaceSet2D and Curve2D. Each shape has its scale interpolated
first from 1 1 to -1 1, which scales the shape in the X direction reducing it on that axis until the scale
goes negative whereupon the shape flips and grows. When it reaches -1 1 it then scales back again to 1 1.
This scaling takes place over a period of 5s and then for 5s the shapes stand still in their unscaled state.
This cycle repeats indefinitely. Shapes can also be scaled on their Y axis too see
IBMImageOnRectangleFlipping for such an example. It
has not been done in this example as the Curve2D shape here is not symmetric about its origin in the Y
axis and so would move when scaled in that direction without other adjustment.
The 5s rotation is driven by a TimeSensor with loop set to false. Another TimeSensor is set with loop
true and its cycleInterval set to 10s. Its cycleTime eventOut is routed to the startTime of the 5s
TimeSensor. Hence each period of the 10s TimeSensor the 5s TimeSensor is started.
Screenshot
Snapshot taken while scaling.
Back to main index