Fichier noeud_16.jps — Modifié le 15 Février 2008 à 18 h 43
%% d'apres les donnees de
%% http://www.mathcurve.com/courbes3d/solenoidtoric/solenoidtoric.shtml
-3 3 setxrange
-3 3 setyrange
50 setxunit
0.01 0 50 SetCamPos
0 0 0 SetCamView
/ScreenDist .05 def
-10 10 setxrange3d
-3 3 setyrange3d
2 setlinejoin
/m 12 def %% ex R
/r 8 def
/n 3 1 div def
/g {
3 dict begin
settvar
#rpn# (m+r*Cos(n*t))*Cos(t)
#rpn# (m+r*Cos(n*t))*Sin(t)
#rpn# r*Sin(n*t)
end
} def
/g' {
3 dict begin
settvar
#rpn# -n*r*Sin(n*t)*Cos(t) - (m+r*Cos(n*t))*Sin(t)
#rpn# -n*r*Sin(n*t)*Sin(t) + (m+r*Cos(n*t))*Cos(t)
#rpn# n*r*Cos(n*t)
end
} def
/g'' {
3 dict begin
settvar
#rpn# -n^2*r*Cos(n*t)*Cos(t) +n*r*Sin(n*t)*Sin(t) + n*r*Sin(n*t)*Sin(t) - (m+r*Cos(n*t))*Cos(t)
#rpn# -n^2*r*Cos(n*t)*Sin(t) -n*r*Sin(n*t)*Cos(t) - (n*r*Sin(n*t))*Cos(t) - (m+r*Cos(n*t))*Sin(t)
#rpn# -n^2*r*Sin(n*t)
end
} def
%rouge
%0 pi 4 mul {g} CourbeR3
% stop
.1 setlinewidth
%/aretescachees false def
GetCamPos setlightsrc
%solidgridOff
0 4 pi mul (g) 1 [200 8] newtube
dupsolid
dupsolid
dupsolid
dup [.5 .6] solidputhuecolors
/A exch def
dup [0 .1] solidputhuecolors
{0 0 90 rotateOpoint3d} solidtransform
/B exch def
dup [.2 .3] solidputhuecolors
{0 0 180 rotateOpoint3d} solidtransform
/C exch def
dup [.8 .9] solidputhuecolors
{0 0 -90 rotateOpoint3d} solidtransform
/D exch def
A B C D
solidfuz
solidfuz
solidfuz
drawsolid**