Skip to content

Update to allow hosting again #1

Merged
merged 1 commit into from Mar 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
46 changes: 24 additions & 22 deletions .classpath
Expand Up @@ -7,29 +7,31 @@
<attribute name="owner.project.facets" value="jst.web"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="lib" path="libs/controlP5.jar"/>
<classpathentry kind="lib" path="libs/core.jar"/>
<classpathentry kind="lib" path="libs/gluegen-rt-natives-linux-amd64.jar"/>
<classpathentry kind="lib" path="libs/gluegen-rt-natives-linux-armv6hf.jar"/>
<classpathentry kind="lib" path="libs/gluegen-rt-natives-linux-i586.jar"/>
<classpathentry kind="lib" path="libs/gluegen-rt-natives-macosx-universal.jar"/>
<classpathentry kind="lib" path="libs/gluegen-rt-natives-windows-amd64.jar"/>
<classpathentry kind="lib" path="libs/gluegen-rt-natives-windows-i586.jar"/>
<classpathentry kind="lib" path="libs/gluegen-rt.jar"/>
<classpathentry kind="lib" path="libs/jogl-all-natives-linux-amd64.jar"/>
<classpathentry kind="lib" path="libs/jogl-all-natives-linux-armv6hf.jar"/>
<classpathentry kind="lib" path="libs/jogl-all-natives-linux-i586.jar"/>
<classpathentry kind="lib" path="libs/jogl-all-natives-macosx-universal.jar"/>
<classpathentry kind="lib" path="libs/jogl-all-natives-windows-amd64.jar"/>
<classpathentry kind="lib" path="libs/jogl-all-natives-windows-i586.jar"/>
<classpathentry kind="lib" path="libs/jogl-all.jar"/>
<classpathentry kind="lib" path="libs/junit.jar"/>
<classpathentry kind="lib" path="libs/org.hamcrest.core_1.3.0.v201303031735.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-fileupload-1.3.2.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-io-2.5.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/core.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/commons-fileupload-1.3.2.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/commons-io-2.5.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/core.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/controlP5.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/core.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/export.txt"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/gluegen-rt-natives-linux-amd64.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/gluegen-rt-natives-linux-armv6hf.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/gluegen-rt-natives-linux-i586.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/gluegen-rt-natives-macosx-universal.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/gluegen-rt-natives-windows-amd64.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/gluegen-rt-natives-windows-i586.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/gluegen-rt.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/jogl-all-natives-linux-amd64.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/jogl-all-natives-linux-armv6hf.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/jogl-all-natives-linux-i586.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/jogl-all-natives-macosx-universal.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/jogl-all-natives-windows-amd64.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/jogl-all-natives-windows-i586.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/jogl-all.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/junit.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/org.hamcrest.core_1.3.0.v201303031735.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/libs/servlet-api.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
2 changes: 2 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/libraries/libs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/libraries/servlet_api.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

242 changes: 242 additions & 0 deletions Knot-Renderer-Servlet.iml
@@ -0,0 +1,242 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="EclipseModuleManager">
<libelement value="jar://$MODULE_DIR$/libs/controlP5.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/core.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/gluegen-rt-natives-linux-amd64.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/gluegen-rt-natives-linux-armv6hf.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/gluegen-rt-natives-linux-i586.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/gluegen-rt-natives-macosx-universal.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/gluegen-rt-natives-windows-amd64.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/gluegen-rt-natives-windows-i586.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/gluegen-rt.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/jogl-all-natives-linux-amd64.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/jogl-all-natives-linux-armv6hf.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/jogl-all-natives-linux-i586.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/jogl-all-natives-macosx-universal.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/jogl-all-natives-windows-amd64.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/jogl-all-natives-windows-i586.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/jogl-all.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/junit.jar!/" />
<libelement value="jar://$MODULE_DIR$/libs/org.hamcrest.core_1.3.0.v201303031735.jar!/" />
<libelement value="jar://$MODULE_DIR$/WebContent/WEB-INF/lib/commons-fileupload-1.3.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/WebContent/WEB-INF/lib/commons-io-2.5.jar!/" />
<libelement value="jar://$MODULE_DIR$/WebContent/WEB-INF/lib/core.jar!/" />
<conelement value="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v9.0" />
<conelement value="org.eclipse.jst.j2ee.internal.web.container" />
<conelement value="org.eclipse.jst.j2ee.internal.module.container" />
<src_description expected_position="0">
<src_folder value="file://$MODULE_DIR$/src" expected_position="0" />
<src_folder value="file://$MODULE_DIR$/junit_tests" expected_position="1" />
</src_description>
</component>
<component name="FacetManager">
<facet type="Python" name="Python">
<configuration sdkName="" />
</facet>
</component>
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/build/classes" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/junit_tests" isTestSource="false" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v9.0" level="application" />
<orderEntry type="library" name="org.eclipse.jst.j2ee.internal.web.container" level="application" />
<orderEntry type="library" name="org.eclipse.jst.j2ee.internal.module.container" level="application" />
<orderEntry type="module-library">
<library name="controlP5.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/controlP5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="core.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/core.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="gluegen-rt-natives-linux-amd64.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/gluegen-rt-natives-linux-amd64.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="gluegen-rt-natives-linux-armv6hf.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/gluegen-rt-natives-linux-armv6hf.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="gluegen-rt-natives-linux-i586.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/gluegen-rt-natives-linux-i586.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="gluegen-rt-natives-macosx-universal.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/gluegen-rt-natives-macosx-universal.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="gluegen-rt-natives-windows-amd64.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/gluegen-rt-natives-windows-amd64.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="gluegen-rt-natives-windows-i586.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/gluegen-rt-natives-windows-i586.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="gluegen-rt.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/gluegen-rt.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jogl-all-natives-linux-amd64.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/jogl-all-natives-linux-amd64.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jogl-all-natives-linux-armv6hf.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/jogl-all-natives-linux-armv6hf.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jogl-all-natives-linux-i586.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/jogl-all-natives-linux-i586.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jogl-all-natives-macosx-universal.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/jogl-all-natives-macosx-universal.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jogl-all-natives-windows-amd64.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/jogl-all-natives-windows-amd64.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jogl-all-natives-windows-i586.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/jogl-all-natives-windows-i586.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jogl-all.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/jogl-all.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="junit.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/junit.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="org.hamcrest.core_1.3.0.v201303031735.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/org.hamcrest.core_1.3.0.v201303031735.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="commons-fileupload-1.3.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/WebContent/WEB-INF/lib/commons-fileupload-1.3.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="commons-io-2.5.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/WebContent/WEB-INF/lib/commons-io-2.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="WebContent/WEB-INF/lib/core.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/WebContent/WEB-INF/lib/core.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="inheritedJdk" />
<orderEntry type="library" name="libs" level="project" />
<orderEntry type="library" name="servlet-api" level="project" />
</component>
</module>
37 changes: 36 additions & 1 deletion README.md
@@ -1 +1,36 @@
# Knot-Renderer-Servlet
# 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](https://tpeters.engr.uconn.edu/JLPZ16-TIA-CTop.pdf).

This prototype was succeeded by the [Subdivision Generator](https://github.uconn.edu/pdz10001/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!