Index
Win3D by Leendert Ammeraal (Click the green words for more information)

1.   Modes of Operation

2.   Defining New Points

3.   Selecting Points

4.   Defining Faces

5.   Viewpoint

6.   Saving Objects

7.   Moving, Copying and Sweeping

8.   Stretching and Mirroring

9.   Rotations, Circles and Solids of Revolution

10. Importing Objects

11. HPGL and DXF files

12. Orientation

13. Showing Coordinates and Vertex Numbers

14. Zooming

15. Stock Objects

16. Printing

17. Marking Special Points

18. Groups

19. The Undo command

20. Invisible edges

21. Creating holes

22. Unification

23. References


Modes of operation
1.  Modes of Operation

There are three ways to start using Win3D:

a.  You can create stock objects using Create.

b.  You can open existing 3D files using File | Open.

c.  You can build a new object using File | New.

Next topic


Defining new points
2.  Defining New Points

After selecting File | New, and entering grid box information, a grid box appears. To define a new point (probably to be used as a vertex), move the cursor to a point of the horizontal grid shown in the xy-plane. Then press the left mouse button and keep it down as you move the cursor either upward or downward. When you release the mouse button, a new point appears in the form of a small blue circle. Then define the next vertex, and so on.

After defining points, you can select them to prepare for defining a new face.

Next topic


Selecting points
3. Selecting Points

You can select and deselect a single point by moving the mouse cursor to it and pressing the right mouse button. Selected points show red circles around them. When points are deselected, these red circles disappear. Selecting points should be distinguished from marking points, the latter being required for some transformations.

You can specify and display a rectangular bounding box to change the select/deselect status of all vertices that lie inside it. If you are working with a grid box, you must first use Edit | Box select or press F4; otherwise this preparatory step is not required. Then press the left mouse button to define one corner of this box and release it to define the opposite corner. For any vertices lying inside this box, the select/deselect state changes: if such a vertex was not selected, it becomes selected and a red circle appears around it. Analogously, any existing red circles inside the box disappear, the corresponding points being no longer selected.

Yet another way of selecting points is by creating groups, each of which contains a subset of all vertices. Once you have several groups, you can select each of them in turn by using the Select group command.

Selecting points is useful for

  a. Deleting points (using the Del key) and the faces to which they belong

  b. Defining bounding faces (or line segments)

  c. Defining a subset of points to be subjected to a Transform command

  d. Selecting a face by means of Edit | Select face (see below)

  e. Showing coordinates or vertex numbers

  f. Creating groups

When you define a bounding face (see b.) the points in question will be the vertices of a polygon. These vertices should be selected in counter-clockwise order, when the polygon is viewed from outside the object.

To select a face that has a great many vertices, just select some of its vertices (not all belonging also to another face) and use Edit | Select face.

Next topic


Defining faces
4.  Defining Faces

After selecting points, you can define bounding faces or (in case of only two points) a line segment, by using Edit | Select face or simply by pressing the Ins key. This causes a dialog box to appear showing the orientation of the specified vertices. You can change this orientation by selecting the appropriate radio button in this dialog box.

Next topic


Position of the eye
5.  Viewpoint

To choose a different viewpoint, click View | Viewpoint and change one or more of the spherical coordinates rho, theta and phi by using scroll bars.

The smaller rho (that is, the viewing distance EO), the stronger the perspective effect will be.

The angle phi should be chosen small if you want to view the object from above. As shown in the Viewpoint dialog box, phi is the angle between the (vertical) z-axis and the line of sight EO, where E is the viewpoint and O the center of the object. A value of 70 (degrees) for phi is very usual.

With theta between -90 and +90 degrees, you view the object from the front. Increasing such a value by 180 means viewing the object from the back.

Next topic


Saving objects
6.  Saving Objects

(This option is not available in the demo version of Win3D. Please refer to the address given by File | About Win3D... for the way you can obtain the complete version, which may also be improved in other respects.)

You can save your object by selecting File | Save as. Group information is also stored in the files produced in this way. The file name extension is .DAT. These files are in ASCII format and have a very simple structure. Except for the new facility of using groups, the file format is  discussed in the first two books listed in the References.

A saved object can be retrieved later by means of File | Open. Also, you can use the File | Import command to combine several objects. Any groups in the imported file are added to those already in use.

Next topic


Moving and Copying
7.  Moving, Copying and Sweeping

You can move, copy or sweep an object or part of it by using Transform | Move/Copy/Sweep. Checking the Leave original box (by clicking it) causes copying, while moving takes place if that box is unchecked. A checkbox is checked if it shows a cross (X) in it. The operation is applied to the currently selected points. Sweeping should be applied only to one polygon at a time, see below.

If one or more points are currently selected, only those points (as well as the faces and lines they belong to) are moved or copied.

Sweeping is one of the most powerful Win3D commands. You can apply it to a previously selected face (that is, to a polygon) to build a prism. For example, if you want to build a cube, you can simply define, say, its bottom face and sweep this in the same way as you would move or copy it to its top face, using Transform | Move/Copy/Sweep and selecting the Sweep radio button. Then, besides the top face of the cube, its four vertical faces appear as well. You need not bother about the orientation of the vertices of a face used in sweeping operations: if required, this orientation will automatically be reversed to make it counter-clockwise when, after building a prism in this way, the face is viewed from outside this prism.

Next topic


Stretching and Mirroring
8.  Stretching and Mirroring

You can stretch an object (changing its size) and you can produce its mirror image, using planes of reflection that are perpendicular to the x- the y- or the z-axis. To keep the original, check the Leave original box. Only selected points can be stretched or reflected. If all points are to be stretched or reflected, use the Select all command of the Edit menu.

To prepare for stretching or mirroring, you must mark some point, which will be a fixed point of the transformation. Since that point will show a square around it, you should use Transform | Sq Mark. For example, if you stretch rectangle ABCD, using A as the fixed point and 200% as the three scale factors, then the new rectangle A'B'C'D' will be such that A' = A, A'B' = 2AB, A'C' = 2AC, A'D' = 2AD. Selecting and marking are independent actions: both selected and unselected points can be marked. It is not possible for two points to have a square mark at the same time.

In case of a reflection (that is, a mirror transformation), the marked point indicates the plane of reflection. For example, if you choose Mirror z when P shows a square mark, the horizontal plane through P will be the plane of reflection. Stretch and mirror operations can be combined, and you can use any combination of the x- y- and z- directions. For each direction you can change the default scale factor of 100%.

Next topic


Rotations and Solids of revolution
9. Rotations, Circles and Solids of Revolution

Win3D enables you to rotate objects or parts of them about any axis (which need not be horizontal or vertical), and through any angle. As with the normal Move and Copy, you can leave the original to perform a Rotate Copy instead of a Move Copy. If you want to approximate a circle by a regular polygon, select only one point, and use the same Rotate Copy radio button, but enter a not too small positive integer (for example, 30) in the Number of steps box. After generating the vertices of a regular polygon in this way, do not forget to insert a face by pressing the Ins key.

It is also possible to form a solid of revolution by selecting the Rotate Sweep radio button. In all three cases, there must be two marked points to determine the axis of rotation. These two points show a square and a triangle. Imagine an arrow, with the two points just mentioned as its tail and its head, respectively. This arrow denotes the direction in which a right-handed screw would advance when turned in the sense of the rotation.

To build a solid of revolution, the selected points must be the vertices of a face, and the two points denoting the axis must lie in the same plane as this face. You need not bother about the orientation of this face: if required, it will automatically be reversed, to make it counter-clockwise, when, after completion of the Rotate Sweep operation (with an angle less than 360 degrees), the face is viewed from outside the solid of revolution.

Next topic


Importing Objects
10. Importing Objects

Objects stored in distinct files can be combined by using File | Open for the first object and File | Import object for the second, the third etc.

Immediately after an object is imported, it is automatically selected. This enables you to transform it or to make a group of it so you can easily select it later. This is not required if there are already groups in the imported file; in that case these new groups are added to those that already exist. For example, if your object contains the groups 1, 2, 3, and you import another object containing the groups 1 and 2, the latter two groups will be renamed 4 and 5, so we obtain the groups 1, 2, 3, 4, 5 in the combined object.

Immediately after using the Import command, you can press the Del key to cancel the effect of this command. Do not use the Undo command in this case.

Frequently the scale of the imported object will be different from the one you were dealing with before using Import. You can then alter its size, using Transform | Stretch. Also, it may be desirable to move the imported object so you can place it beside the object you were originally dealing with.

Next topic


HPGL Files
11. HPGL and DXF Files

The File | Export HPGL command enables you to obtain an HPGL file of a hidden-line or wire-frame representation. The recommended file-name extension for HPGL files is .PLT (or .HPG). These files can be imported in most draw programs (such as Corel Draw) and text processors (such as WordPerfect and Word for Windows).

The HPGL file will result in a wire-frame model if a wire-frame model is visible on the screen when you give the Export HPGL command. Otherwise, a hidden-line image will be written to the HPGL file.

If, instead of line drawings, you want a hard copy of a hidden-face representation, you can use either the clipboard or a screen-capture program.

The File | Export DXF command produces a DXF file, similar to those used by AutoCAD and other graphics packages. In contrast to HPGL files, these DXF files will contain 3D information of the object. In other words, a DXF file contains the x, y and z coordinates of the object in question, while an HPGL file describes only its (perspective) image. DXF files are not as compact as the normal Win3D data files (.DAT files) used by the Save and Open commands.

Next topic


orientation
12. Orientation

With Win3D, objects are defined by the polygons (called faces) that form their boundaries. When you view a face from outside the object, the orientation of its vertices must be counter-clockwise. This is relevant when we are selecting the vertices of the face just before pressing the Ins key (or before using the Edit | Select face command). For example, consider this square ABCD:

    A        B

    D        C

To make the orientation counter clockwise, you may select these four points only in any of the following ways: DCBA, CBAD, BADC, ADCB. After pressing the Ins key, a dialog box appears so you can check if you have used the correct orientation. If not, you can immediately change the orientation by clicking a radio button. The same dialog box appears if you first select some points of a face and then use the command View | Show orientation.

Next topic


Showing Coordinates and Vertex Numbers
13. Showing Coordinates and Vertex Numbers

It is sometimes desirable to know the coordinates or the numbers of one or more vertices. For example, when using the Move command you have to specify distances x, y and z. You may then want to know the coordinates of some of the vertices to be moved. You can obtain these by first selecting those vertices and then using the Show x, the Show y and the Show z commands of the View menu. Similarly, the Show nr command displays the numbers of the selected vertices. These numbers are referred to in error messages about points not lying in the same plane. You can also find them in the files obtained by using the Save and Save as commands.

To make the coordinates or numbers disappear, use View | Hidden lines, for example.

Next topic


Zooming
14. Zooming

You can magnify part of your image by using View | Zoom in, or simply by pressing F2. This works by means of a rectangle, which, together with its contents, is scaled up to cover most of your window. You can define this rectangle by pressing the left mouse button at one of its corners and release it at the opposite corner. The normal view is then restored by using View | Zoom restore, or by pressing F3.

Note that zooming alters only the image, not the object itself, as the Stretch command does.

Next topic


Stock objects
15. Stock Objects

The Create menu enables you to create a cube, a prism, a pyramid and a sphere very easily. Both the prism and the pyramid have regular polygons as their bases. Except for the cube, these stock objects require an integer n. When you create a prism or a pyramid, n will be the number of vertices of its base. For large n, say, n = 30, a prism and a pyramid will approximate a cylinder and a cone, respectively. For a sphere, there will be n horizontal slices, with n  - 1 approximated horizontal circles between a north and a south pole. Each of these approximated circles will be a regular polygon with 2n vertices. Remember, curved surfaces can always be approximated by a set of flat faces. The larger the value of n, the better this approximation will be but the more computing time will be required.

You can enter n in a dialog box, which appears when you choose one of the commands Prism, Pyramid and Sphere.

These stock objects all fit in a sphere with radius 1 and with the origin as its center, except for the pyramid, which has the origin as the center of its base.

There is also the command Create | Vertex, which enables you to define a new vertex by entering its x, y and z coordinates. If you want to use this method for many points, use function key F7. 'Loose' points (not connected by lines) can be displayed as small blue dots by means of the command View | Show vertices, which actually shows all vertices this way.

Next topic


print
16. Printing

If your printer has graphics capabilities, you can use File | Print to print an image of the object you have created. If you do this when a wire-frame model is shown on the screen, the same wire-frame model is printed. In any other mode (hidden-line, hidden-face or grid box) a hidden-line model will be printed.

If you want a hard copy of the hidden-face representation of your result, you can write the current screen to the Windows clipboard by using the Alt+Print Screen key combination. Then some other program, such as Corel Draw, for example, can import it by means of its Paste command. Or you can use a special screen-capture program for Windows applications. An example of such a program is Collage Plus (published by Inner Media, Inc.), which can produce bitmapped files in various formats. After having imported the bitmapped file with your DTP program or text processor, you can print the result.

Next topic


marking
17. Marking Special Points

A point marked by a surrounding square is required for stretching and mirroring transformations, while rotating transformations also require a second marked point, surrounded by a triangle. You can mark points by using the commands Sq Mark and Tr Mark of the Transform menu, or by pressing their shortcut keys, F11 and F12, respectively. Clicking a vertex of your object, using the right mouse button, then causes that vertex to be marked. At most one point can be marked with a square and at most one with a triangle. In other words, at most two points can be marked at the same time.

In a stretching operation, the point marked with a square will be a fixed point; similarly, with mirrorring, that point indicates the position of the horizontal or vertical plane of reflection.

In rotations, the two marked points will be interpreted as the end points of an arrow (or a vector), the triangle corresponding to the arrow head.

Finally, to create a hole in a face on the basis of two coplanar polygons, one lying inside the other, a square mark on the outer polygon and a triangular mark on the inner one indicate the invisible coinciding edges that the resulting face will have.

Next topic


groups
18. Groups

Complex objects are normally composed of several parts. When all vertices of such a part are selected (showing red circles) the Edit | New group command makes a group of it. By repeating this process for other subsets of vertices you can create several groups. A vertex can belong to only one group. Later you can select the vertices of a group very quickly by using Edit | Select group. Groups are automatically numbered 1, 2, ..., n, where n is the number of groups currently defined. When using the Select group command repeatedly, you select these groups 1, 2, ..., n one by one. Each time the group number and the total number of groups is shown in the title bar.

Groups are particularly useful when a vertex, say, P, of one part of an object coincides with a vertex P' of another. It would then be rather difficult to select P. You could do this by selecting some other vertices of a polygon of which P is a vertex and then using the Select face command. However, it is much easier to let these two parts be different groups. Then you can always quickly select one part (by means of Select group and (temporarily) move it so P and P' no longer coincide.

It may be desirable to select all vertices of two or more groups. This can be done by means of the Edit | Add group command (or Ctrl+F6). Like Select group, command Add group selects the next group, but any points already selected remain selected. In other words, this command adds the next group to the set of selected points. This principle would be useless if the groups to be selected have numbers that are not consecutive. However, group numbers can be made consecutive by using Edit | Change group numbers. Suppose, for example, you have groups 1, 2, ..., 10, and you want to select the groups 3 and 8. Then you can select group 3 (by pressing F6 several times) and use Change group numbers. This generates a dialog box asking you for a new group number, for which you can enter 7. Group 3 now becomes group 7, and at the same time the old groups 4, 5, 6 and 7 become groups 3, 4, 5 and 6, respectively. Consequently, the groups you wanted to select are now numbered 7 and 8. All vertices of these two groups can now be selected by pressing F6 until group 7 is selected followed by pressing Ctrl+F6.

Next topic


undo
19. The Undo command

If you make a mistake, for example, by deleting your object or part of it, use Edit | Undo or press the Esc key immediately after your wrong command. The Undo command may also be useful immediately after transformations. For example, if you have performed a rotation about some angle, and you do not remember this angle, use Undo if you want to go back to the situation before the rotation. (For a simple rotate move for which you remember the angle you have used, you could instead use the inverse rotation, making the new angle the negative of the old one. Simply pressing the Esc key is easier, however.)

Since the Undo command and the preparations for it may take some time, it does not apply to some actions that can easily be undone in another way. For example, after the File | Import command, you can simply press the Del key to cancel the effect of this command. If you regret having changed your viewpoint you should use the View | Viewpoint command once again, possibly clicking the Default button. The Undo command does not work for Zoom in either. Instead, simply press the F3 key.

Next topic


invisible
20. Invisible edges

If you use the View | Hidden lines command, all lines (or parts of them) obscured by the object are automatically removed, while all visible edges are drawn. However, it is sometimes desirable to make some of these visible edges invisible as well. This may be the case with curved surfaces, approximated by flat faces. A common edge of two such faces can explicitly made invisible by selecting its two end points and using View | Invisible. Applying this command once again for the same edge turns it visible again.

If some edges of a face are made invisible, it may seem that the face is no longer there. However, it can still obscure other line segments. This shows that it is present although you do not see (all) its edges.

Next topic


holes
21. Creating holes

Before subjecting a polygon, say, face F, to a sweep move (using Transform | Move/Copy/Sweep, you can create a hole in it. You first create this hole as a face, say, H. Polygon H must lie in the same plane as polygon F and inside it. Then you select some vertices of both face F and of face H (all vertices not belonging to F being deselected). You must now define an invisible edge, which will connect two vertices, one of face F and the other of hole H. Use a square mark for the vertex of F and a triangular mark for that of H. Preferably, these two marks should lie closely together; the invisible edge that connects them must not intersect another edge. Then all that remains is using Transform | Create hole. If you want to create several holes, you can do so. Once a hole has been created, each of its vertices can later be given a square mark to create an invisible edge to a new hole (showing a triangular mark). This is because creating a hole H in face F results in a new face F', containing all vertices of F and H.

Next topic


unify
22. Unification

If several vertices coincide, we can make one vertex of them by using command Edit | Unify coinciding points. There will be coinciding vertices, for example, if we generate two cubes of equal size and place them exactly on top of each other. Two vertices in the same position give problems when we want to select them. Unification solves these problems; it also renumbers any vertices that have numbers higher than those that have been disposed of. After applying this Unify command, all vertex numbers are consecutive. Two vertices in the same position will not be unified if they belong to different groups.

Next topic


books
23. References

If you are interested in the mathematical principles and programming aspects on which this program is based, you can use the following books for further reference. They are by Leendert Ammeraal and published by John Wiley, Chichester, England. Some programs (in their executable form) and some data files discussed in the first two of these books are also on the Win3D distribution disk:

   - Programming Principles in Computer Graphics, 2nd Ed. (1992)

   - Interactive 3D Computer Graphics (1988)

   - Windows Wisdom for C and C++ Programmers (1993)

   - Programs and Data Structures in C, 2nd Ed. (1992)

   - C for Programmers, 2nd Ed. (1991)

   - C++ for Programmers (1991)

   - Graphics Programming in Turbo C (1989)

If you have any comments on Win3D or on the above books, please write to the publisher (at the address given by File | About Win3D...), or to the author: Leendert Ammeraal, Reigerlaan 4, 1241 ED Kortenhoef, The Netherlands.

Back to index