Fichier spirale_04.jps — Modifié le 17 Mars 2008 à 21 h 43

spirale_04.pdf
Source
%% d'apres les donnees de
%% http://www.mathcurve.com/courbes3d/spiraleconic/pappus.shtml

-1 1 setxrange
-1 1 setyrange
200 setxunit

30.01 30 0 SetCamPos
0 0 0 SetCamView
/ScreenDist .02 def
GetCamPos setlightsrc
%solidgridOff

-10 10 setxrange3d
-3 3 setyrange3d
2 setlinejoin

/a .5 def
/b pi 3 div  def

/g {
3 dict begin
   settvar
#rpn# a*Sin(b)*t*Cos(t)
#rpn# a*Sin(b)*t*Sin(t)
#rpn# a*Cos(b)*t
end
} def

/g' {
3 dict begin
   settvar
#rpn# a*Sin(b)*Cos(t) - a*Sin(b)*t*Sin(t)
#rpn# a*Sin(b)*Sin(t)+ a*Sin(b)*t*Cos(t)
#rpn# a*Cos(b)
end
} def

/g'' {
3 dict begin
   settvar
#rpn# -a*Sin(b)*Sin(t) - a*Sin(b)*Sin(t) - a*Sin(b)*t*Cos(t)
#rpn# a*Sin(b)*Cos(t) + a*Sin(b)*Cos(t) - a*Sin(b)*t*Sin(t)
#rpn# 0
end
} def

.1 setlinewidth

-8 pi mul 8 pi mul (g) .5 [600 6] newtube
%dup (rouge) outputcolors
dup [.1 .3] solidputhuecolors
%dup videsolid
drawsolid**