Closed Curves.-
The three types of curves explained in the previous paragraph, can be drawn as a closed shape in a simple way. Obviously, with more or less difficulty, this can be done by hand, moving points and working in a very precise way. Mg5 has implemented an automatic way of doing it.
The simplest object of the three mentioned to create a closed shape is the spline. It is created in the same way as the open spline. The only difference is than when finishing the object clicking the right-mouse-button, the spline will close making three new last points to be the same as the three first. Once closed, the object can be edited and its shape modified changing the position of its control points.
The bezier object has a “special” way for closing itself. If it is wanted to maintain its characteristics of continuity of first order, it is imperative to have an even number of define points already used before clicking the right-mouse-button. Doing this will close the curve and also, will “rearrange” the position of the the available points to modify its position and the shape of the curve but maintaining always its continuity characteristics.
If the bezier curve is closed with an odd number of defining points it will just close itself joining the first and the last point in a way that, usually will be a “corner” point. The illustrations below shows those two possibilities.
The figure at left has four points to define it, and the one at right, five. In both cases, the right-mouse-button has been clicked after the last point has been created. It should be noted that owing to the rearrangement of the curve after an even point is created, the user should have this knowledge to know where to place those points.
The closed nurb has been added but to make it behave in the same way as its “father”, the bezier one, has not been possible due to the very different routines employed in both. Working with a nurb, only when a number of points being a multiple of four have been placed, it can be closed. Otherwise, the curve obtained will not be a closed one and what is worse, the java-metagraf curve seen on the screen will be different from the one obtained trough Metapost.
Consequently, it is recommended to use closed nurbs only when knowing what it is being done.
Madrid, January 2006 |
|