[pstricks] R: Re : R: Re : Fwd: PSTricks code -- pst-solides3d
Carlo Alberini
carloalbe1 at yahoo.it
Sun Jul 3 17:41:59 CEST 2011
Thank you for your code ... now I have some examples! I think I can work!
Best regards
C.
--- Dom 3/7/11, Manuel Luque <mluque5130 at aol.com> ha scritto:
Da: Manuel Luque <mluque5130 at aol.com>
Oggetto: [pstricks] Re : R: Re : Fwd: PSTricks code -- pst-solides3d
A: pstricks at tug.org
Data: Domenica 3 luglio 2011, 16:50
I have another method?
\documentclass{article}
\usepackage{pst-solides3d}
\def\bicone{% generation du bicone
/dZ 0.5 def
/Rayon 3 def % rayon de la base
/Hauteur 3 def % hauteur d'un cone
/THETA Rayon Hauteur atan def
/tanTHETA {Rayon Hauteur div} bind def
/dPHI 10 def
/tableau_des_sommets [
Hauteur neg dZ Hauteur dZ sub{/Z exch def
0 dPHI 360 {/PHI exch def
/r1 Z abs tanTHETA mul def
/r2 Z dZ add abs tanTHETA mul def
r1 PHI cos mul % x0
r1 PHI sin mul % y0
Z % z0
r1 PHI dPHI add cos mul % x1
r1 PHI dPHI add sin mul % y1
Z % z1
r2 PHI dPHI add cos mul % x2
r2 PHI dPHI add sin mul % y2
Z dZ add % z2
r2 PHI cos mul % x3
r2 PHI sin mul % y3
Z dZ add % z3
} for
} for
]
def
/Sommets {tableau_des_sommets aload pop} def
/NbrePoints tableau_des_sommets length 3 div cvi def
/Faces {0 4 NbrePoints 4 sub {
/Ni exch def
[ Ni Ni 1 add Ni 2 add Ni 3 add]
} for
} def
/Faces_internes {0 4 NbrePoints 4 sub {
/Ni exch def
[Ni 3 add Ni 2 add Ni 1 add Ni]
} for
} def
}
\begin{document}
\begin{center}
\psset{unit=0.7}
\psset{lightsrc=viewpoint}
\psset{viewpoint=100 30 20 rtp2xyz,Decran=100}
\begin{pspicture}(-3,-5)(3,5)
\pstVerb{\bicone}%
\psSolid[object=new,sommets=Sommets,faces={Faces},
hollow,
incolor=yellow!25,
intersectiontype=0,
intersectionlinewidth=2,
intersectioncolor=(rouge),
intersectionplan={[0 0.5 1 1]}]
\axesIIID[linecolor=blue](0,0,3)(8.5,4.5,4)
\end{pspicture}
\begin{pspicture}(-5,-5)(5,5)
\pstVerb{\bicone}%
\psset{solidmemory}
\psSolid[object=new,sommets=Sommets,faces={Faces},
hollow,
plansepare={[0 0.5 1 1]},
name=partbicone,
action=none]
\psSolid[object=load,
hollow,rm=0,
incolor=yellow!25,
load=partbicone1,
intersectiontype=0,
intersectionlinewidth=2,
intersectioncolor=(rouge),
intersectionplan={[0 0.5 1 1.01]}]
\psSolid[object=plan,definition=equation,
args={[0 0.5 1 1] 180},
base=-3 3 -3 3,linewidth=0.01,
planmarks,showBase,
action=draw]
\psSolid[object=load,
incolor=yellow!25,
load=partbicone0](0,4,0)
\axesIIID[linecolor=blue](0,0,0)(8.5,4.5,4)
\end{pspicture}
\end{center}
\end{document}
ML
-----E-mail d'origine-----
De : Carlo Alberini <carloalbe1 at yahoo.it>
A : Graphics with PSTricks <pstricks at tug.org>
Envoyé le : Dimanche, 3 Juillet 2011 16:23
Sujet : Re: [pstricks] R: Re : Fwd: PSTricks code -- pst-solides3d
With this example and the previous one, I have solved my problems! I have now understood the right code.
Thank you so much
Best regards
C.
--- Dom 3/7/11, Herbert Voss <Herbert.Voss at fu-berlin.de> ha scritto:
Da: Herbert Voss <Herbert.Voss at fu-berlin.de>
Oggetto: Re: [pstricks] R: Re : Fwd: PSTricks code -- pst-solides3d
A: "Graphics with PSTricks" <pstricks at tug.org>
Data: Domenica 3 luglio 2011, 14:02
Am 02.07.2011 21:45, schrieb Carlo Alberini:
> Yes, that would be perfect, but I don't know the right PSTricks code for generate the "solidcreux (cone)" that you can find in page 3 in http://melusine.eu.org/syracuse/mluque/solides3d2007/sections/sections-cone/sections-bicone.pdf.
> Moreover, if it possible, without generating .dat files (I am not able to generate them, and I don't know how programs could generate them - I use Mac OsX 10.5.8) and without \codejpg. In fact I need the right PSTricks code (\defFuntion, and so on) to generate all the cone sections I need only modifying the involved functions, like the code you have received in attachment.
> For example I am not able to use the object=load with solids that I create, but only with the predefinite solides; I would like to use this object=load with my own solides.
> On the other hands, if I have the right code to generate the conic sections that you can find in http://melusine.eu.org/syracuse/mluque/solides3d2007/sections/sections-cone/sections-bicone.pdf in the style of the draw you can find in this page 3, that would be perfect.
here is an example for a cone:
\documentclass{article}
\usepackage{pst-solides3d}
\begin{document}
\begin{pspicture}(-5,-6)(8,7)
\psset{viewpoint=50 -40 10 rtp2xyz,Decran=50}
\defFunction{cone}(u,v){u v Cos mul}{u v Sin mul}{u}
\psSolid[object=cone,h=4,r=3,
plansepare={[1 0 0 -1]},
name=ConeA,
ngrid=9 30,
action=none](0,0,-4)
\psSolid[object=cone,h=4,r=3,
plansepare={[1 0 0 -1]},
name=ConeB,
RotY=180,
ngrid=9
30,
action=none](0,0,4)
\psSolid[object=load,load=ConeA1,hue=0.8 0.1]
\psSolid[object=load,load=ConeB1,hue=0.8 0.1,inhue=1 0]
\psSolid[object=load,load=ConeA0,RotZ=90,hue=0.8 0.1](0,6,-1.3)
\psSolid[object=load,load=ConeB0,RotZ=90,hue=0.8 0.1](0,6,-0.5)
\end{pspicture}
\end{document}
Herbert
-----Segue allegato-----
_______________________________________________
PSTricks mailing list
PSTricks at tug.org
http://tug.org/mailman/listinfo/pstricks
archive: http://www.tug.org/pipermail/pstricks/
_______________________________________________
PSTricks mailing list
PSTricks at tug.org
http://tug.org/mailman/listinfo/pstricks
archive: http://www.tug.org/pipermail/pstricks/
-----Segue allegato-----
_______________________________________________
PSTricks mailing list
PSTricks at tug.org
http://tug.org/mailman/listinfo/pstricks
archive: http://www.tug.org/pipermail/pstricks/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20110703/24b20603/attachment.html>
More information about the PSTricks
mailing list