## Parameterized Knots

### Parametric Curve Grapher

In order to render graphics, LiveGraphics3D requires coordinates of points, line segments, and polygons that will be displayed. Jonathan Rogness has created a "proof of concept" application [11] where a user may input the equations of a parametrically defined surface into a form on a webpage, and a JavaScript program automatically generates the data required by LiveGraphics3D. Based on this concept, we have created a parametic curve grapher, designed to be user-friendly and offer many options to customize the appearance of the parametric curve.

Of particular importance in knot theory diagrams is the ability to determine whether a particular crossing point is an over-crossing or an under-crossing. Therefore, we have chosen to display the surface of a tube around the parametric curve entered by the user. To generate the tube coordinates $$F(t, \, u)$$ given the parametric curve $$\overrightarrow{C}(t)$$, we perform the following computations for each point $$t$$:

• Calculate a unit tangent vector $$\overrightarrow{T}(t)$$ for the curve $$\overrightarrow{C}(t)$$
• Calculate a unit normal vector $$\overrightarrow{N}(t)$$ by normalizing the cross product of $$\overrightarrow{T}(t)$$ with an arbitrary vector $$\overrightarrow{v}$$
• Calculate a unit binormal vector $$\overrightarrow{B}(t)$$ by taking the cross product of $$\overrightarrow{T}(t)$$ and $$\overrightarrow{N}(t)$$
• Let the function $$F(t, \, u)$$ be defined by $F(t, \, u) = \overrightarrow{C}(t) + r \cdot ( \cos(u) \cdot \overrightarrow{N}(t) + \sin(u) \cdot \overrightarrow{B}(t) )$ where $$r$$ represents the radius of the tube around the parametric curve, $$t$$ ranges over the interval specified by the user, and $$u$$ ranges from $$0$$ to $$2 \pi$$.

Since the user interface is written using JavaScript, the coordinate functions $$x(t), \; y(t),$$ and $$z(t)$$ must be entered using JavaScript syntax:

• Arithmetic operations $$+$$, $$-$$, $$*$$, $$/$$ and parentheses should be entered as is standard.
• Exponents such as $$x^n$$ must be entered as "Math.pow(x,n)."
• The trigonometric functions $$\sin(t)$$, $$\cos(t)$$, and $$\tan(t)$$ must be entered as "Math.sin(t)," "Math.cos(t)," "Math.tan(t)."
• The constant $$\pi$$ must be entered as "Math.PI."

Graphics options that may be customized include:

• the number of sample points used for the $$t$$-coordinate
• the radius of the tube and the number of sample points taken around the radius of the tube
• the inclusion of coordinate axes, a coordinate box, surface wire mesh, and a title for the graph

After rendering the graph, the data generated for the LiveGraphics3D applet appears in a text box at the bottom of the parametric curve grapher. This data may be copied and pasted into a text file, and used as an input file for a standalone applet created by the user (see [6] for additional details).

3D Parametric Curve Grapher

Equations (x, y and z)
 x(t) =  y(t) =  z(t) =

Preset Equations:

Parameter properties (t)
 Min = Max = Points =

Tube properties
 Radius: Sections: 6 8 10 12 14 16 18 20 30 40 50

Graphics properties
 Title: On Off Title Text: Axes: On Off Box: On Off Mesh: On Off