Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132935 views
License: OTHER
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
16
\codejps{%
17
/cylindre1 {
18
-5 2.5 5 [36 36] newcylindre
19
{2.5 0 0 translatepoint3d} solidtransform
20
dup (White) outputcolors
21
} def
22
/sphere1 {
23
5 [36 72] newsphere
24
dup (White) outputcolors
25
} def
26
/CS {cylindre1 sphere1 solidfuz} def
27
CS drawsolid**
28
}
29
\psPoint(0,0,0){O}
30
\psSolid[object=courbe,r=0,
31
function=F,
32
range=0 360,
33
linecolor=red,
34
linewidth=4\pslinewidth]
35
\end{pspicture}
36
\end{document}
37
38