IBM TJ Watson Research

IBMShapesCenterScaling

IBMShapesCenterScaling.mp4

Description

A Circle, Rectangle, IndexedFaceSet2D and an IndexedLineSet2D are scaled by routing a PositionInterpolator2D to the scale field of a Transform2D each containing one of these Shapes. Each shape is translated into the quadrant it is in by 50 pixels in both the X and Y directions. Each Transform2D also has the center set to the inverse of the translation so that the center for scaling is at 0,0. Center field is used both for scaling and rotation. This test concerns scaling. The scale is varied from 1.0 1.0 up to a max of 2.0 2.0 and to other values in between (minimum value being 0.05).

In each quadrant is also a static gray shape that has the same shape as each of the dynamically scaling shapes when they are at the max scale during the interpolation of 2.0 2.0. At the max scale these gray shapes should be completely covered by their dynamic colored counterparts.

Note: the line thickness of the IndexedLineSet2D is not scaled.

Screenshot

Snapshot taken before scaling commenced.



Snapshot taken whilst shapes were dynamically scaling.



Snapshot taken whilst shapes were at 2.0 2.0 scale and cover the gray shapes.



Back to main index