Plotter 2D
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 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.
The Refresh button, clears everyting on the screen.
The User may try to find out keyboard shortcuts for actions and modes depicted above, by hit and trial.
Author appreciates if somebody can improve the framework developed above and share it for greater public good.
Comments and suggestions welcome
Yash
               (
geocities.com/yashbhandari1982)