Graphical Input: Difference between revisions
From Knot Atlas
Jump to navigationJump to search
DrorsRobot (talk | contribs) No edit summary |
DrorsRobot (talk | contribs) No edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 16: | Line 16: | ||
<!--$$?KnotInput$$--> |
<!--$$?KnotInput$$--> |
||
<!--Robot Land, no human edits to "END"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{HelpAndAbout| |
|||
{{HelpLine| |
|||
n = 3 | |
n = 3 | |
||
n1 = 4 | |
|||
in = <nowiki>KnotInput</nowiki> | |
in = <nowiki>KnotInput</nowiki> | |
||
out= <nowiki>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!</nowiki> |
out= <nowiki>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!</nowiki> | |
||
about= <nowiki>The KnotInput program was written by M. Ochiai, C. Nakai, Y. Matsuyama and N. Imafuji and is imported to KnotTheory` via the package LinKnot by S. Jablan and R. Sazdanovic</nowiki>}} |
|||
<!--END--> |
<!--END--> |
||
Line 34: | Line 36: | ||
<tt>K</tt> is now perfectly usable within <tt>KnotTheory`</tt>: |
<tt>K</tt> is now perfectly usable within <tt>KnotTheory`</tt>: |
||
<!--$K=GaussCode[{-1,-4,2,3},{-3,-5,4,6},{5,1,-6,-2}];++n;$--><!--END--> |
|||
<!--$$Kh[K][q, t]$$--> |
<!--$$Kh[K][q, t]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{InOut| |
{{InOut| |
||
n = |
n = 5 | |
||
in = <nowiki>Kh[K][q, t]</nowiki> | |
in = <nowiki>Kh[K][q, t]</nowiki> | |
||
out= <nowiki> 3 5 7 2 11 3 9 4 11 4 13 4 |
|||
out= <nowiki>1 |
|||
q + q + q t + q t + q t + 3 q t + 2 q t</nowiki>}} |
|||
- + q |
|||
q</nowiki>}} |
|||
<!--END--> |
<!--END--> |
Latest revision as of 19:33, 31 March 2006
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/"];
|
|
|
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.
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[5]:=
|
Kh[K][q, t]
|
Out[5]=
|
3 5 7 2 11 3 9 4 11 4 13 4
q + q + q t + q t + q t + 3 q t + 2 q t
|