Drawing with TubePlot: Difference between revisions
From Knot Atlas
Jump to navigationJump to search
No edit summary |
|||
Line 83: | Line 83: | ||
<!--$$Show[TubePlot[ |
<!--$$Show[TubePlot[ |
||
{Cos[2t], Sin[2t], 0} |
{Cos[2t], Sin[2t], 0} |
||
0.5{Cos[3t]Cos[2t], Cos[3t]Sin[2t], -Sin[3t]}, |
0.5{Cos[3t]Cos[2t], Cos[3t]Sin[2t], -Sin[3t]}, |
||
{t, 0, 2Pi}, 1/3, |
{t, 0, 2Pi}, 1/3, |
||
Line 94: | Line 94: | ||
n = 12 | |
n = 12 | |
||
in = <nowiki>Show[TubePlot[ |
in = <nowiki>Show[TubePlot[ |
||
{Cos[2t], Sin[2t], 0} |
{Cos[2t], Sin[2t], 0} |
||
0.5{Cos[3t]Cos[2t], Cos[3t]Sin[2t], -Sin[3t]}, |
0.5{Cos[3t]Cos[2t], Cos[3t]Sin[2t], -Sin[3t]}, |
||
{t, 0, 2Pi}, 1/3, |
{t, 0, 2Pi}, 1/3, |
Revision as of 07:17, 15 June 2007
(For In[1] see Setup)
|
Thus here's a thin unknot:
In[3]:=
|
Show[TubePlot[{Cos[t], Sin[t], 0}, {t, 0, 2Pi}, 0.1]]
|
Out[3]=
|
-Graphics3D-
|
|
|
|
Here's the same unknot, made thicker and not as smooth:
In[8]:=
|
Show[TubePlot[
{Cos[t], Sin[t], 0}, {t, 0, 2Pi}, 0.3, TubeSubdivision -> {6, 3}
]]
|
Out[8]=
|
-Graphics3D-
|
Let's play with the framing now:
In[10]:=
|
Show[TubePlot[
{Cos[t], Sin[t], 0}, {t, 0, 2Pi}, 0.2,
TubeSubdivision -> {50, 2},
TubeFraming -> {Cos[2t]Cos[t], Cos[2t]Sin[t], Sin[3t]}
]]
|
Out[10]=
|
-Graphics3D-
|
Here's an example that uses a prelude and passes options on to Graphics3D
:
The last example serves as the basis for the definition of TubePlot[TorusKnot[m, n]]
. Here's a final example:
In[14]:=
|
Show[TubePlot[TorusKnot[3, 5]]]
|
Out[14]=
|
-Graphics3D-
|
Standalone TubePlot
There may be some independent interest in the routine TubePlot
, and hence it is available also as an independent package. Here it is: TubePlot.m (File:TubePlot.m).