Plotter 2D Surfaces
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, and lofted surfaces 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.

The surfaces generated may be written in the format as:

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

The Refresh button, clears everyting on the screen.

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

Author appreciates any suggestions or comments

Yash

    Source: geocities.com/yashbhandari1982/files

               ( geocities.com/yashbhandari1982)