Skip to content

pdz10001/Visual-Curve-Servlet

dev
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Visual-Curve-Servlet

This code is a prototype for calculating the number of subdivisions required for isotopic convergence between a stick knot and its associated Bézier curve. More information on the topic can be read about here.

This prototype was succeeded by the Subdivision Generator. That code does not require a Web Server to run; you can run it locally where your hardware will determine the length of time to compute the subdivisions.

For the time, the number of subdivisions required that is calculated lives on the server only. If you deploy the server, you'll see the result as M1, M2, and M3 in the logs. The max of M1, M2, and M3 is the upper bound on the number of subdivisions required.

With the server up, load the webpage at http:localhost:8080/Knot-Renderer-Servlet. That will serve you the page where you can upload a curve file. An example curve file looks like the following:

1.307600000000000,  -3.332000000000000,  -2.507200000000000
-1.384118500000000,   4.682550500000000,   0.913541000000000
-3.2983075,-4.0566825,2.686189
-0.1232995,2.768254,-2.463584
3.9079915,-4.533357,1.2263705
-3.935983,-0.438272,-0.983365
3.218174000000000,   4.296123000000000,  2.112459500000000
1.307600000000000,  -3.332000000000000,  -2.507200000000000

Those are points for a closed, simple stick knot; in this case it is the unknot. When those points are saved to a .curve file and uploaded, the associated Bézier curve is generated and displayed.

If you press the "Toggle Stick Knot" button, it will show you the original stick knot from the file you uploaded.

Deploying your own server:

To deploy your own server and calculate the required number of subdivisions you'll first need an instance of Apache Tomcat.

  1. Using Eclipse EE, right click -> Export -> WAR.

  2. Name the artifact ROOT.war

  3. Stop Tomcat

  4. Delete ROOT and ROOT.war in the Tomcat/webapps folder

  5. Copy over the new ROOT.war artifact

  6. Start the server again. You're good to go!

About

Prototype for calculating the number of subdivisions required for isotopic convergence between a stick knot and its associated Bézier curve.

Resources

Stars

Watchers

Forks

Releases

No releases published