[pstricks] pst-solides3d mismatch between tow objects

Markus Krebs markuskrebs at web.de
Wed Oct 6 16:33:41 CEST 2010


  Dear pstricks-users!

For some hours I've tried to put a pyramid into a sphere.

The coordinates of the pyramid are A( 5 , 1 , 0), B(1 , 5 , 2), C(-1 , 1 
, 6), D(3, -3, 4) and S(6 , 3 ,7). All corners are part of a sphere. The 
center of the sphere has to be calculated.

Result: M(3, 3/2, 4), a sphere with radius 4.5. A normal vector to the 
square ABCD is (4 / 2 / 4). This gives directional angles of 48.18 
degrees, 70.52 degrees and 48.18 degrees.

I' dont really understand the rotX/rotY/rotZ-part of pst-solides3d.

Minimal example:

\documentclass{article}
\usepackage[dvipsnames,svgnames]{xcolor}
\usepackage{pst-solides3d,pstricks-add}
\begin{document}
\psset{plotpoints=200,unit=0.5}
\begin{pspicture}(-10,-4)(10,17)
\psset{lightsrc=viewpoint,lightintensity=1,viewpoint=65 30 10,Decran=120}
\axesIIID[showOrigin=true,linecolor=Orange,axisnames={x_1,x_2,x_3}](0,0,0)(10,10,10)
\psSolid[object=new,
num=all,
show=all,
numfaces=all,
action=draw*,
fillcolor=red!25,
incolor=yellow,
sommets=
%
5 1 0  %% A 0
1 5 2  %% B 1
-1 1 6 %% C 2
3 -3 4 %% D 3
6 3 7, %% S 4
faces={
[0 1 2 3] %0
[2 3 4]   % 1
[1 2 4]   % 2
[0 1 4]   % 3
[0 4 3]   % 4
},
linecolor=red,
]%
\psSolid[object=line,linecolor=Purple,linestyle=dashed,args=5 1 0  -1 1 6]
\psSolid[object=line,linecolor=Purple,linestyle=dashed,args=1 5 2 3 -3 4]
\psSolid[
  r=4.5,
  object=sphere,action=draw,
  ngrid=20 20,
RotX=18.48,%%
RotY=48.189,
RotZ=48.189
](3,1.5, 4)
\psSolid[object=line,linecolor=DarkGreen,linewidth=2pt,linestyle=dashed,args=2 
1 3 6 3 7]
\end{pspicture}
\end{center}
\end{document}

Thanks for any help in advance!

Markus



More information about the PSTricks mailing list