Moving into Space

Working with drawing canvas only allows you to create curves in the xy-plane. To design space curves, we need to work with the z-axis and use transformations that can applied to all three coordinate axes.

All previous discussions only show the curve on the xy-plane. The z-axis is the axis that is perpendicular to the xy-plane (i.e., the screen). To see the z-axis, space transformations are required. This system supports transformations (i.e., translations and rotations) applied to the whole scene or to a curve. Transformations applied to the scene will transform the coordinate axes as well as all curves. One might consider scene transformations equivalent to moving one's camera around. Transformations applied to a curve only translate or rotate the current curve, the curve selected for further editing. The coordinate axes remain unchanged.

Space transformations are performed using buttons and sliders in the bottom part of the drawing canvas as shown below:

Clicking on Curve and Scene selects the current curve and the scene to be translated or rotated, respectively. Clicking on Point only allows the selected control point be translated. The ID of the selected control point is shown in the Point button and the coordinate values and weight are shown in buttons X, Y, Z and W. The top slider is for translation and the bottom slider is for rotation.

Transforming the Scene

To move a planar curve into space, the first step is perhaps rotating the scene followed by translating some selected control points in the z direction. Note that the x-axis and y-axis point to the left and top of the screen, respectively, while the z-axis points to the viewer (i.e., right-handed system).

This system has a virtual and invisible world coordinate system which is identical to the one shown on the drawing canvas when the scene is not translated and rotated. If your select Techniques followed by Show Coordinate Axes, you will see the coordinate axes. The horizontal one is the x-axis, the vertical one is the y-axis, and the one pointing at you is the z-axis.

To translate or rotate the scene, we should first select what should be transformed (i.e., scene or curve), followed by a reference axis (i.e., x-, y- or z-axis), followed by moving the little triangles of the two sliders to generate the desired effects. The following is a B-spline curve of degree 5 defined by 12 control points:

Now we want to rotate the scene about the y-axis. Clicking on the Scene button. It will be shown in blue color indicating that all subsequent transformations will be applied to the whole scene. To carry out rotation about the y-axis, click on button Y. Then, it is also shown in blue, indicating that all subsequent transformations will be performed with respect to the y-axis (i.e., translating in the y-axis direction and rotating about the y-axis). Finally, sliding the little triangle of the Rotate slider will rotate the scene about the y-axis, and sliding the the little triangle of the Translate slider will translate the scene parallel to the y-axis. The following figure shows the result of rotating the scene about the y-axis:

Next, let us rotate the scene about the x-axis. Please note that a scene rotation is always about one of the three virtual and invisible coordinate axes. The x-axis is the one parallel to your screen's horizontal edge, the y-axis is the one parallel to your screen's vertical edge, and the z-axis is perpendicular to your screen. These three virtual axes never change. In this way, you will have a world coordinate as an absolute reference. To rotate the scene about the x-axis, click on X would be sufficient because the button Scene is still active. The following shows the result of rotating the scene about the (virtual) x-axis. Now you can see all three coordinate axes and the position of the curve (in the xy-plane).

Moving Control Points

As you can see from the above figure, the curve is planar in the xy-plane. Since the control points are in space, we can move them out of the xy-plane. To do so, you need to select the control point by clicking on it. Then, the coordinates and weight of the selected control point are shown in the buttons X, Y, Z and W. Also, the ID of the selected control point will be shown in the button Point in blue color, indicating that all subsequent translations will be applied to this point. Note that control points cannot be rotated. To translate control points in space, one can only use the Translate slider. Click on X, Y or Z to choose a translate direction, followed by using the Translate slider to position the selected control point. To translate another control point, select it and repeat this procedure. The following figure shows the result of translating some control points in the z-direction. The result becomes a space curve rather than a planar one. Click here to download the file (space-curve-1.dat) that define the above space curve.

The following figure shows the xy-plane view of this curve, which looks exactly the same as the original planar curve since we did not move any control points in the xy-direction.

If we rotate the scene so that the x-axis is perpendicular to the screen, the result is the left figure below. It is obvious that now all control points have z-coordinate different from 0. The right figure below is the result of rotating the scene so that the y-axis is perpendicular to the screen.

Transforming the Current Curve

If button Curve is selected, then all transformations are applied to the current curve and the scene will not change. However, the reference coordinate axis for translation and rotation are the coordinate axes shown on the drawing canvas rather than the virtual world coordinate axes as used for transforming the scene. The following figure shows the result of rotating the above curve about the z-axis.

Note that you can intermix scene and curve transformations to complete your design. However, at any time, a transformation can either be applied to the selected point, the current curve or the scene.

Zooming

Zooming is equivalent to moving a camera toward (i.e., zooming in) or away from (i.e., zooming out) the object. Thus, zooming can only be applied to the scene. Clicking button In (resp., Out) moves the camera toward (resp., away from) the scene. Sometimes, after a couple of transformations, part of the scene may be moved outside of the drawing canvas. In this case, zooming in/out would be very useful.