Graphical Input

From Knot Atlas
Revision as of 19:29, 31 March 2006 by Drorbn (talk | contribs)
Jump to navigationJump to search


Thanks to our link with LinKnot, on Windows systems KnotTheory` accepts graphical knot input.

(For In[1] see Setup)

As in the section Using the LinKnot package, the first step is to add LinKnot to the Mathematica search path. This path will likely be different on your computer.

In[2]:= AppendTo[$Path, "C:/bin/LinKnot/"];
In[3]:= ?KnotInput
KnotInput[] opens a window in which you can draw a knot or link by hand. Right click and select 'Quit' when you're done. This function requires the package LinKnots`, and will only run on Windows machines. Sorry!

Thus for example, the input line

In[5]:= K = KnotInput[]

pops a blank window on which a knot or a link can be drawn with mouse clicks. At first pass all crossings are drawn as "new over old", but a further click on any given crossing will flip it.

KnotInput in action.

A right click followed by selecting "quit" will then determine the Gauss code of the knot or link just drawn and return it to Mathematica:

Out[5]= GaussCode[{-1,-4,2,3},{-3,-5,4,6},{5,1,-6,-2}]

K is now perfectly usable within KnotTheory`:

In[4]:= Kh[K][q, t]
Out[4]= 1 - + q q