/usr/class/cs368/assignments/assignment2/spline.
You are expected to use this program to generate sample points as input to your curve reconstruction program.
1. What is ISE?
ISE (Interactive Spline Editor) is a simple program for user to interactively input, edit, and sample cubic splines. It is written by using the LEDA library.
ISE is used to generate sample points to test your crust constrution program (aka the assignment 2 of CS368). You may choose to program your own user interface and read point sets generated by ISE or to integrate it with ISE.
3. Which kind of splines are handled by ISE?
for m(0) 2*(m(1)-m(0)) - (m(2)-m(0))/2
for m(n-1) 2*(m(n-1)-m(n-2)) - (m(n-1)-m(n-3))/2.
You may look the files Spline.h C for the implementation. You may call member functions of class BezierArc to obtain the parametric description which is a degree 3 polynomial.
Currently, ISE is only available on Sun Sparc platform. To run it, simply type "ISE". Usually, you first draw some spline curves, edit, sample, and then save them. You can save both curves and sample-points to data files. But you can only load curves.
5. What are the available commands?
Press right button and you will see a pop-up menu that contains all the available commands. Bascially, there are three groups of commands: curve input/edit, sample generate/edit, and IO commands.
6. How to input spline curves?
To draw a curve, you need to select "Draw closed Curves" or "Draw Open Curves" in the pop-up menu. Then, you can click left button to input control points and click right button once you are done.
To edit a curve, you first need to select "Edit Curves". To choose a curve, you need to click right on the curve. Then, a green bounding box will appear around the chosen curve. You can then move spline by press the left button anywhere inside the bounding box and drag it to any other place. However, if you click right on the curve, a new control point will be inserted. If the point happens to be a control point, you will move that control point to the place where you release the mouse button (you would not be able to see the effect unless you release the button). To delete a spline curve, you need to press left button inside the bounding box and hold the shift key while you release the button. To delete a control point, you can press left button on the point and hold the control key while releasing the button.
Be careful when you edit a curve which you have sampled --- all the sample points will be deleted if you insert or delete a control point.
9. How to save sampled points?
You may choose to save the sample points. It will ask whether you want to scramble or purturb the points. Scrambling means saving the sample points in a random order. Purturbing means purturbing all the points by a rate (which is specified by users). The data file format is quite straight forward --- the number of points following by the coordinates of each point.
10. What is the data file format of splines?
The data format is as follows:
n --- number of splines spline 1 spline 2 ... spline nFor each spline, it is:
closed (or open) --- whether it is a closed or open curve. (x, y) --- (x,y) is the offset of the spline m --- the number of control points p1 --- control points p2 ... pm
11. Why does the interface look so ugly?
To make you focus on the key part (or to reduce my work load :), we use the window class provided by LEDA. Since LEDA is not specialized as a user interface design or graphics library, it only provides some basic widgets.
12. What if the program crashes?
Send an email to lizhang@cs.stanford.edu.