[pstricks] Solides3d: strange result to fusion

robert.fischer10 at arcor.de robert.fischer10 at arcor.de
Sat Jul 18 22:03:39 CEST 2009


Hello Jean-Paul,

thanks for your reply. I played a little bit around. 
If the radius between inner and outer cone differes significantly,
the picture looks perfect. If the radius of the outer cone is only
a little bit greater than the inner cone, the picture is not as
expected. 

Extreme example as attachment:
the inner cone is black, the outer cone gray. But the inner cone
is completely inside the outer cone. Neverthless the inner cone
is shown partly.

Actually this looks like an rounding error. Maybe the accuracy of
the sorting algorithm is not enough for small distances between
the faces.

Simple solution for me as user is just to increase the radius
difference between the cones....

Many thanks and enjoy your weekend,
Robert.






> Message: 1
> Date: Sat, 18 Jul 2009 07:22:09 -0800
> From: Akos Valentinyi <valentinyi.a at gmail.com>
> To: Graphics with PSTricks <pstricks at tug.org>
> Subject: Re: [pstricks] Solides3d: strange result to fusion
> Message-ID:
> 	<e4378dc30907180822p6bb45318sa4eec460315213c0 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> On 7/18/09, robert.fischer10 at arcor.de <robert.fischer10 at arcor.de> wrote:
> > Hello,
> >
> > below you see an example handling the fusion of two hollow cones.
> > One cone is completely located within the other cone. The fused
> > object looks a little bit strange in case of having
> > ngrid = a b with a not equal 1. The result is the same for
> > a) conecreux without using hollow
> > b) cone with using hollow
> >
> > Description of Attachments:
> > 1) Cones01: ngrid = 1 18
> > -> looks perfect
> > 2) Cones02: ngrid = 2 18
> > -> looks as if there is a hole in the outer cone. You see the black inner
> > cone (please open attachment)
> > 3) Cones03: ngrid = 4 18
> > -> same as 2), but only problems with bottom line 1 and 2 (please see
> > attachment)
> > 4) Cones04: ngrid = 20 18
> > -> same as 3). Seems to be as if only the first two lines are influenced.
> >
> > Code
> > \documentclass{minimal}
> > \usepackage{pst-pdf}
> > \usepackage{pstricks}
> > \usepackage{pst-solides3d}
> >
> > \pagestyle{empty}
> >
> > \begin{document}
> > 		\psset{viewpoint=15 50
> > 30,lightsrc=viewpoint,lightintensity=1.2,Decran=140}
> > 		\begin{pspicture}(-3,0)(3,7)
> > 			%Grid
> > 			\psgrid[gridcolor=gray,subgridcolor=lightgray]
> > 			%
> > 			%Local Postscript Definitions RadtoDeg
> > 			\pstVerb{
> > 				/MyHS{2}def
> > 				/MyRS{0.5}def
> > 				/MyHP{MyHS 0.5 mul}def
> > 				/MyRP{MyRS 1.5 mul}def
> > 				/MyHN{MyHS 1.2 mul}def
> > 				/MyAlpha{MyRS MyHS  atan neg}def
> > 				/MyBeta{MyAlpha MyRP MyHP atan add}def
> > 				/MyRN{MyHN MyBeta tan mul}def
> > 			}
> > 			%Enable Memory
> > 			\psset{solidmemory}%solidmemory=true
> > 			%
> > 			%Nutationskegel
> > 			\psSolid[object=conecreux,
> > 				h=MyHN,r=MyRN,ngrid=2 18,
> > 				RotX=180,
> > 				fillcolor=gray,incolor=gray!50,
> > 				action=none,name=MyConeN](0,0,MyHN)
> > 			%
> > 			%Spurkegel
> > 			\psSolid[object=conecreux,
> > 				h=MyHS,r=MyRS,ngrid=2 18,
> > 				RotX=180,
> > 				fillcolor=black!90,incolor=gray,
> > 				action=none,name=MyConeS](0,0,MyHS)
> > 			
> > 			%Fusion
> > 			\psSolid[object=fusion,
> > 				base=MyConeS MyConeN,
> > 				grid=false,opacity=0.6]
> > 				\composeSolid
> > 				
> > 		\end{pspicture}
> > \end{document}
> >
> > Have a nice weekend,
> > Robert.
> 
> -- 
> Sent from my mobile device
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Sat, 18 Jul 2009 18:24:56 +0200
> From: Jean-Paul Vignault <jpv at melusine.eu.org>
> To: Graphics with PSTricks <pstricks at tug.org>
> Subject: Re: [pstricks] Solides3d: strange result to fusion
> Message-ID: <4A61F758.40902 at melusine.eu.org>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
>  > Hello,
> 
> Hello,
> 
>  > below you see an example handling the fusion of two hollow cones.
>  > One cone is completely located within the other cone. The fused
>  > object looks a little bit strange in case of having
>  > ngrid = a b with a not equal 1. The result is the same for
>  > a) conecreux without using hollow
>  > b) cone with using hollow
> 
> I have no time to make tests, but I think it's not a bug : this is the
> default of painter's algorithm : faces are sorted from farest to
> nearest before draw. The distance is from face's center to point of
> view.
> 
> Best regards
> 
> Jean-Paul

-------------- next part --------------
A non-text attachment was scrubbed...
Name: M01-pics.ps
Type: application/postscript
Size: 345283 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20090718/6ac1a117/attachment-0001.ps>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: M01-pics.pdf
Type: application/pdf
Size: 6980 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20090718/6ac1a117/attachment-0001.pdf>


More information about the PSTricks mailing list