Plotter 2D Mesh
Readme File

Author should be acknowledged if this work is used in any way.

Created By: Yash Bhandari
Contact Info: yb82@rediffmail.com

About the Program

The program is designed to plot 2D, Bezier and Bspline curves,Revolved, swept, extruded, lofted, bi-cubic bspline and bibezier surface using OpenGL and MFC. For various editing operations the program operates in different modes.

In point mode user may create new points by clicking on screen. Each of these points may be selected by further left-clicking the points again. The selected points may also be deleted. The point may also be dragged to other location in this mode.

In Bezier Mode, the user may specify the control by selecting the previouly defined points of by creatin new points. For Bezier mode, the curve order is automatically taken from the number of modes. However, user may activate sub-divison mode in which case de-casteljau subdivison algorithm is used to generate subdivision curve. The degree of subdivision is specified by subdivision order specified. A vertex may also be specified multiple number of times for better control. Dragging of such vertex in point mode will lead to motion of all the multiple' vertices at that point.

As the name suggests, Uniform, Open Uniform and Random Bspline modes draw the Bspline curves of the specified order for the control polygon. They work in a very similar way to the Bezier mode. The difference between the three are the knot vectors. The Uniform Bspline has uniformly increasing knot vector. The Open uniform knot vector is similar to uniform knot vector,but has repeated knots at ends. The random bspline has randomly varying knot vector. This random knot vector is for demonstrative purposes only. Subdivision has also been inplemented for Open Uniform Cubic Bsplines.

In the delete mode, user may delete the entities created by him. Deleting a point, which is part of polygon leads to removal of that point from the control polygon, while everything else remains the same. Deleting a control polygon leads to deletion of associated curve as well. However, deleting a curve, will not cause the polygon to be deleted.

The Insert after mode allows the user to insert point into the control polygon, after a given point in the polgon.

The Insert before mode allows the user to insert point into the control polygon, before a given point in the polygon.

In Extrude mode, the user must select an already drawn curve to get an extruded surface, along the direction specified in the extrude direction column for a length specified in extrude length column.

In Sweep mode, select the base curve first and the guide curve to sweep it along to. The base curve is assumed to lie in the x-y plane and the guide is assumed to be in the y-z plane.

In Loft surface mode, a parametrically lofted surface is created between multiple curves. The number of curves is specified in the number of curves dialog. The distance between the curves is specified in the ditance between column.

In revolve mode select a curve first which is to be revolved and then select a point, along which a vertical line is taken as axis of rotation.

In bicubic mode, use already generated surfaces as a polygon mesh for creating the bicubic B-Spline surface.

Use the Bi-Bezier to generate bibezier surface from the polygonal mesh of the already generated surfaces.

Do-Sabin, Clark and Loop surfaces may also be created from already generated surfaces.

The surfaces generated may be written in the format as:

#Nodes #Elements
Node Coordinates
.
.
.
Element Coordinates
.
.
.

The mesh generated may be written and read in the format described above or exported in a .vis format which can be seen by interface.exe utility also developed by myself.

The Refresh button, clears everyting on the screen.

3D view allows user to see the objects drawn in a trimetric view.

Some other salient features are mentioned here

Most of the things in the program are simple and easily understanble. A few things about mesh are mentioned for clarity

1. Surfaces and Mesh are treated differntly in this program.

2. A surface is divided into patches the collection of which is called a mesh.

3. To generate the mesh from a surface, first draw the surface. Ask program to write file. Clear the current screen and hen load the mesh

4. The Mesh can be converted into triangular mesh by pressing of a button, unloading current mesh and loading new mesh.

5. Each Iteration of subdivisioon can be controlled by pressing the appropriate subdivision button.

6. Lofted surfaces usually have some trouble meshing.

7. The Hole example does not display in the program because of the differnece in the scales used in the program and that in the example.
To see the results, first, load the hole example by pressing appropriate button, then do the iteration steps onto it.During the entire process, graphical represnetation may not be possible. To see the output, export the file for visualization. Exit he cureent program and then open file in interface.exe . Interface.exe may not be useful for other objects exported with this program.

Author appreciates any suggestions or comments

Yash

    Source: geocities.com/yashbhandari1982/files

               ( geocities.com/yashbhandari1982)