sphere-cylinder.tex 797 B

12345678910111213141516171819202122232425262728293031323334353637
  1. \documentclass[pstricks,border=2pt]{standalone}
  2. \usepackage{pst-solides3d}
  3. \begin{document}
  4. \psset{
  5. unit=0.5,
  6. lightsrc=50 -50 50,
  7. viewpoint=100 0 0 rtp2xyz,
  8. Decran=110,
  9. linewidth=0.5\pslinewidth
  10. }
  11. \begin{pspicture}(-7,-6)(6,6)
  12. \defFunction{F}(t){
  13. t cos dup mul 5 mul
  14. }{t cos t sin mul 5 mul}{t sin 5 mul}
  15. \codejps{%
  16. /cylindre1 {
  17. -5 2.5 5 [36 36] newcylindre
  18. {2.5 0 0 translatepoint3d} solidtransform
  19. dup (White) outputcolors
  20. } def
  21. /sphere1 {
  22. 5 [36 72] newsphere
  23. dup (White) outputcolors
  24. } def
  25. /CS {cylindre1 sphere1 solidfuz} def
  26. CS drawsolid**
  27. }
  28. \psPoint(0,0,0){O}
  29. \psSolid[object=courbe,r=0,
  30. function=F,
  31. range=0 360,
  32. linecolor=red,
  33. linewidth=4\pslinewidth]
  34. \end{pspicture}
  35. \end{document}