I am trying to draw figures with pstricks
for the first time. Unfortunately, I am struggling with it. I was trying to draw a pentagon-cone and an octahedron using pst-solides3d
, but it draws some lines dashed which actually are not hidden. I used this code:
\begin{pspicture}(-2,-1)(3,4)
\psset{viewpoint=25 8 5,Decran=50}
\psSolid[object=new,
action=draw,
sommets=
0 0 0
0.343561 1.05737 1
-0.899454 0.653491 1
-0.899454 -0.653491 1
0.343561 -1.05737 1
1.11179 0 1,
faces={
[0 1 2]
[0 2 3]
[0 3 4]
[0 4 5]
[0 5 1]
[ 1 2 3 4 5]}]%
\end{pspicture}
\begin{pspicture}(-2,-1)(3,4)
\psset{viewpoint=25 8 5,Decran=100}
\psSolid[object=new,
action=draw,
sommets=
%n=4
0 0 0 %0
0.420448 0.420448 0.5 %e1
-0.420448 0.420448 0.5 %e2
-0.420448 -0.420448 0.5 %e3
0.420448 -0.420448 0.5 %e4
0 0 1, %u
faces={
[0 1 4]
[0 1 2]
[0 2 3]
[0 3 4]
[2 3 5]
[3 4 5]
[1 2 5]
[1 4 5]}]%
\end{pspicture}
The result, however, looks like this:
Obiously, lines which should be dashed (because they are hidden) are not and some lines which should be continuous are dashed. Does anyone know how to fix this problem?
Thanks for your answers. There is still something strange.
If I set num=all
, like in the code
\begin{pspicture}(-2,-1)(3,4)
\psset{viewpoint=25 12 5,Decran=100}
%\axesIIID[showOrigin=false](1,1,1)(3,2,2.5)
\psSolid[object=new,
action=draw*,
fillcolor=red,
opacity=.6,
fcol=8 (Blue),
num=all,
sommets=
%n=4
0 0 0 %0
0.420448 0.420448 0.5 %e1
-0.420448 0.420448 0.5 %e2
-0.420448 -0.420448 0.5 %e3
0.420448 -0.420448 0.5 %e4
0 0 1 %u
0 1.18921 1 %w1
-1.18921 0 1 %w2
0 -1.18921 1 %w3
1.18921 0 1, %w4
faces={
[0 1 4]
[0 2 1]
[0 3 2]
[0 4 3]
[2 3 5]
[3 4 5]
[1 2 5]
[1 5 4]
[6 7 8 9]}]%
\end{pspicture}
then I get the following result:
which is obviously not as intended. How can I fix this?
...,num=all,numsep=2pt,...
. However, it would make more sense to define your object as two solids