[pstricks] intersection jaggies
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Sat Jun 16 14:54:52 CEST 2012
Am 16.06.2012 14:33, schrieb Herbert Voss:
> Am 14.06.2012 21:48, schrieb Jon Joseph:
>> I have three questions regarding the output from the code below:
>>
>> 1) Notice the jaggedness at the intersection of the plane and the
>> hyperboloid. Is there any way to smooth this without requiring the
>> ngrid parameter to be smaller than I have it?
>>
>> 2) I know that when I do a fusion parameters like linecolor are lost
>> but incolor and fillcolor are retained (the one I really want is
>> opacity but it is tossed as well). Is it a technical impossibility to
>> retain these settings?
>>
>> 3) The \composeSolid macro does not seem to be needed. Is this true in
>> all cases?
>
> draw the interlines as functions:
>
> \documentclass{article}
> \usepackage{pst-solides3d}
>
> \begin{document}
>
> \psset{viewpoint=50 30 30 rtp2xyz,Decran=50}
> \psset{lightsrc=viewpoint}
> \begin{pspicture}[solidmemory](-7,-8)(7,8)
> \defFunction[algebraic]{plane2}(u,v){0}{u}{v}%
> \defFunction[algebraic]{hyperboloid}(u,v){(1+u^2)^0.5*cos(v)}{(1+u^2)^0.5 *
> sin(v)}{u}%
> \psSolid[object=surfaceparametree, linecolor=blue!40, base=-3 3 0 6.28,
> fillcolor=cyan!50,incolor=green!50, function=hyperboloid, ngrid=.15 .15,
> action=none,name=hyper1]
> \psSolid[object=surfaceparametree, linecolor=blue!40, base=Pi neg Pi -3
> 3, fillcolor=red!50,
> function=plane2,ngrid=.2 .2,action=none,name=firstplane]
> \psSolid[object=fusion,base=hyper1 firstplane,grid]
> % the intersection line
this one is better:
\defFunction[algebraic]{inter1}(t){0}{(1+t^2)^0.5}{t}
\defFunction[algebraic]{inter2}(t){0}{-(1+t^2)^0.5}{t}
\psSolid[object=courbe,r=0,linecolor=blue,linewidth=3pt,
range=-3 3, ngrid=.15 .15,
function=inter1,grid,action=draw]
\psSolid[object=courbe,r=0,linecolor=blue,linewidth=3pt,
range=1 3, ngrid=.15 .15,function=inter2,grid,action=draw]
instead of
> \defFunction[algebraic]{inter1}(u,v){0}{(1+u^2)^0.5}{u}
> \defFunction[algebraic]{inter2}(u,v){0}{-(1+u^2)^0.5}{u}
> \psSolid[object=surfaceparametree,linecolor=blue,linewidth=3pt,base=-3 3
> 0 Pi, ngrid=.15 .15,
> function=inter1,grid,action=draw]
> \psSolid[object=surfaceparametree,linecolor=blue,linewidth=3pt,base=1 3
> 0 Pi, ngrid=.15 .15,
> function=inter2,grid,action=draw]
>
> \axesIIID(0,0,0)(5,5,5)
> \end{pspicture}
>
> \end{document}
>
>
> \composeSolid is done by default with \end{pspicture}
>
> Herbert
More information about the PSTricks
mailing list