Creating Basic 2D Shapes






Creating Basic 2D Shapes

Before you master creating 2D shapes, you have to know where to find their controls. It’s important that you first find out how to create 2D shapes so that you can convert them to 3D forms later. You can access 2D Shape tools from three places — on the Main menu by choosing Create>Shapes, by clicking the Shapes tab on the Tab Panel, and on the Command Panel, shown in Figure.


Figure: The Command Panel.

Common shapes

Eleven separate 2D Shape options are available: Line, Rectangle, Circle, Ellipse, Arc, Donut, NGon, Star, Text, Helix, and Section. This chapter looks at each of them. Because the Command Panel contains ways to customize 2D shapes, it’s a more convenient approach than the Main menu or the Tab Panel.

Line

The Line is the most basic 2D shape. You create Lines by click-and-drag movements in a viewport (usually not the Perspective Viewport). Two parameter settings in the Command Panel are especially vital in the creation of 2D Line Shapes:

  • Initial Type (Corner or Smooth): Choosing Corner as an Initial Type creates a sharp corner when the line changes direction; choosing Smooth creates a smooth curve.

  • Drag Type (Corner, Smooth, or Bezier): The three Drag Types set how the line behaves when it is dragged after clicking.

After a Line is created, and before you click anywhere else in a viewport, the Initial Type and Drag Type can be changed, and the Line will reflect the changes before your eyes. Create a Line using the Command Panel option by following these steps:

  1. Choose Create>Splines>Line in the Command Panel.

    Spline is an interchangeable term for a 2D shape.

  2. Create a Line with Sharp or Smooth points (vertices) by choosing the appropriate Initial Type in the Command Panel.

     Tip  Whatever viewport you work in, select the Smooth display so the line stays visible.

  3. Decide whether you want a Sharp, Smooth, or Bezier Drag Type, and click the appropriate radio button in the Drag Types section.

     Tip   Bezier is a spline that has control handles at the points where it has been clicked — it’s the best choice if you want to edit the Lines shape afterward.

  4. Select a Non-Perspective Viewport.

  5. Lines are created by either or both click-and-drag or click-to-click operations, so try both.

  6. When you want to determine the end of the line, simply click.

You can constrain the direction in which a line is drawn by holding the Shift key down as you draw the line. If you want to remove a vertex, press the Backspace key on the keyboard.

Rectangle

The Rectangle is a closed Line with Sharp corners. The Rectangle is created in one click-and-drag movement. Holding down the Ctrl key on your keyboard while creating the Rectangle constrains the shape to a perfect square. When the Rectangle is the shape and size you want it to be, you simply let up on the mouse button.

Of all the Rectangle parameters in the Command Panel, Corner Radius is especially important. By default, it is set to 0 in the current units. Inputting other values up to about 5.5 will make the Rectangle’s corners more and more round. Above that value, you will start to introduce loops into the shape, which is okay only if you want them. Very high values produce very wacky shapes, as shown in Figure.

Click To expand
Figure: Variations of the Rectangle shape created by altering the Corner Radius value.

Circle

The Circle is always a perfect circle, and is created in one motion by a click-and-drag movement. You release when it is the size you want.

Ellipse

The Ellipse is created in a single click-and-drag movement; you release when it’s the size you want. Holding down the Ctrl key while you create the Ellipse constrains it into a circle, as shown in Figure.

Click To expand
Figure: Variations of the Ellipse shape.

Arc

The Arc is a curved segment of a circle. It is created by clicking to set the beginning of the Arc, dragging to the end point of the Arc, and then clicking and dragging to determine the size of the invisible circle that the Arc is a part of. (It may take a little practice to create exactly the Arcs you want; Figure shows some examples.)

Click To expand
Figure: Variations of the Arc shape.

Donut

The Donut is a circle within a circle, perfectly concentric. You create it by clicking and dragging to form one radius, and then dragging and clicking to form the second radius and to set the shape, as shown in Figure.

Click To expand
Figure: The Donut, ready for 2D dunking.

NGon

The NGon is a polygon with N sides. You can set the value of N in the NGon’s Command Panel. The higher the value of N, the more the NGon will approach the shape of a circle, as shown in Figure.

Click To expand
Figure: The NGon can have three or more sides (edges).

Star

The Star shape is determined by its number of Points and by two radii that set how far those points are from the center. You can set all three parameters in the Star’s Command Panel. One click-and-drag movement sets the overall size of the Star; a second click-and-drag movement sets the relationship between the two radii. Figure shows three different Stars created this way.

Click To expand
Figure: These Star shapes have different numbers of points, and also show different radii relationships.

Text

3D Text is one of the most requested features in any 3D software, and 2D Text shapes are the basis of 3D Text. When you click the Text option in the Command Panel, a number of parameters come into view, as shown in Figure.


Figure: The Text parameters in the Command Panel.

The most important parameters in the Text Command Panel are Font Name and Text Content. When you click the downward arrow next to the Font name, you can scroll down the list that appears and select any font on your system. You type the actual text message in the Text area. Clicking in a viewport places the Text string (a line of text) in the scene.

Weird and wonderful shapes

The last two spline options located in this Command Panel, Helix and Section, are not really 2D shapes at all — they are imaginary constructs that inhabit 3D space (insert spooky sci-fi movie music here). All the other splines visited in this chapter inhabit 2D space, where they lie around on a flat 2D plane and show no depth at all. Not these two beauties, however.

Helix

The Helix is a conical spring shape, or you may even liken it to a tornado. When selected, its parameters are displayed in the Command Panel, where they can be adjusted.

Radius 1 and Radius 2 set the radii that start and end the Helix. If both are equal, the resulting Helix is cylindrical. If one is much smaller than the other, the resulting Helix is conical. The Height value determines the total height of the Helix, from starting radius to ending radius. Setting a Turns value determines how many windings the Helix has.

Bias, which determines the spread of the Helical windings, can range from -1 to 1 (the default is 0, which produces a totally unbiased helix). Setting Bias to -1 will push most of the windings toward the radius 1 point; setting Bias at +1 will force the Helical windings toward the Radius 2 point. CW sets the windings to be clockwise; CCW forces a counterclockwise result. By adjusting some or all of these values, you can create interesting variations. As a rule, work in the Top Viewport when you create a Helix. Click-and-drag movements do the job; you can make any adjustments later in the Command Panel parameters. Figures 5-9 and 5-10 tell the (winding) tale of the Helix.

Click To expand
Figure: A Helix with a Bias of –1 on the left, 0 in the center, and +1 on the right create some interesting variations.
Click To expand
Figure: Create the Helix in the Top Viewport.

Section

Although a Section is a flat 2D shape, it owes its existence to a 3D object. A Section is a visual slice (like a CAT scan) of the 3D model. To explore the creation of a Section, follow these steps:

  1. Place a Standard or Extended Primitive in a scene.

    I have used a Sphere as an example in the illustration.

  2. Choose Create>Splines in the Command Panel, and click Section.

  3. Choose any Non-Perspective Viewport.

  4. Left-click and drag from one point (vertex) on the model to an opposite edge, and then right-click.

  5. In the Section’s Command Panel controls, click Create Shape.

    The Section appears in the viewports, as shown in Figure.

    Click To expand
    Figure: I used a Sphere as the Sectioning target, so the Section is a circular slice.

Open and closed shapes

It’s pretty obvious that the Circle, Ellipse, Rectangle, and other 2D splines (shapes) are closed. A closed shape has a continuous border around it, so it has an inside and an outside. But what if you’re creating a sharp-cornered or smooth-cornered Line, and you want it to become a closed shape? No problem; here’s the drill:

  1. Choose the Line option from the Splines Command Panel.

  2. Choose the viewport you want to work in, and start creating an interesting shape by click-and-drag movements.

  3. To close the shape, move the mouse so the pointer is above the first point you created. Then click once.

    A window appears, asking whether you want to close the shape.

  4. Click Yes if you want to close the shape, as shown in Figure.

    Click To expand
    Figure: Clicking Yes closes your freeform shape.



 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows