[pstricks] vanishing plane
Jon Joseph
josco.jon at gmail.com
Sun Jun 10 14:13:14 CEST 2012
Thanks Herbert. I actually tried it with both an incolor and a fillcolor thinking that would solve the "sides" issue but it didn't help. Your solution of redirecting the normal did work. I have decided to parametrize the plane and used something like:
\defFunction[algebraic]{plane}(u,v){1+u}{1+v}{0}
\psSolid[object=surfaceparametree, fillcolor=yellow!50, incolor=blue!50, function=plane, base=-2 2 -2 2]
That all seems to work with viewpoint behavior that, at least for me, is a bit more intuitive. Also the docs have a mistake on page 110 where the extent of the parametrized surface is called "range= ... " but the actual parameter seems to be "base = ... " .
It is a powerful package just a bit fussy at times. Thanks again.
Jon
On Jun 10, 2012, at 5:00 AM, pstricks-request at tug.org wrote:
> Send PSTricks mailing list submissions to
> pstricks at tug.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://tug.org/mailman/listinfo/pstricks
> or, via email, send a message with subject or body 'help' to
> pstricks-request at tug.org
>
> You can reach the person managing the list at
> pstricks-owner at tug.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of PSTricks digest..."
>
>
> Today's Topics:
>
> 1. Re: problem with pscustom (Herbert Voss)
> 2. vanishing plane (Jon Joseph)
> 3. Re: vanishing plane (Herbert Voss)
> 4. Re: vanishing plane (Herbert Voss)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 9 Jun 2012 18:35:19 +0200
> From: Herbert Voss <Herbert.Voss at FU-Berlin.DE>
> To: <pstricks at tug.org>
> Subject: Re: [pstricks] problem with pscustom
> Message-ID: <4FD37B47.1020705 at FU-Berlin.DE>
> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
>
> Am 09.06.2012 18:21, schrieb Kin Mye:
>
>> The bad news is that the update did not solve the problem ...
>>
>> The good news: I manage to narrow down the problem. It seems it is related with'evince', the pdf viewer.
>>
>> The process I follow: latex + dvips + ps2pdf14 and evince to see the .pdf.
>>
>> - evincemyfile.ps <http://myfile.ps> : ok
>>
>> - evince myfile.pdf: wrong (see the atached png)
>
> I see and can confirm the bug, but have no idea what is
> going wrong with evince.
>
> You should file a bug report to the evince developer
>
> Herbert
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 9 Jun 2012 11:39:46 -0500
> From: Jon Joseph <josco.jon at gmail.com>
> To: <pstricks at tug.org>
> Subject: [pstricks] vanishing plane
> Message-ID: <0488A6B1-F000-451F-88D7-34250D8CCCBB at gmail.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Ok. I get it. But I gotta say that just seems wrong given the fact that my cylindrical surface is still visible from both viewpoints even though it also has a front and a back.
>
> Thanks for your help. Jon
>
>
> On Jun 9, 2012, at 11:28 AM, pstricks-request at tug.org wrote:
>
>> Send PSTricks mailing list submissions to
>> pstricks at tug.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> http://tug.org/mailman/listinfo/pstricks
>> or, via email, send a message with subject or body 'help' to
>> pstricks-request at tug.org
>>
>> You can reach the person managing the list at
>> pstricks-owner at tug.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of PSTricks digest..."
>>
>>
>> Today's Topics:
>>
>> 1. vanishing plane as function of viewpoint (Jon Joseph)
>> 2. problem with pscustom (Kin Mye)
>> 3. Re: vanishing plane as function of viewpoint (Herbert Voss)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Sat, 9 Jun 2012 10:28:52 -0500
>> From: Jon Joseph <josco.jon at gmail.com>
>> To: <pstricks at tug.org>
>> Subject: [pstricks] vanishing plane as function of viewpoint
>> Message-ID: <99557E44-5C86-45E8-8F61-75A4FB7236E1 at gmail.com>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> Once again I am doing battle with the pst-solides3d package. Can someone explain to me why the tangent plane vanishes when I change the viewpoint?
>>
>>
>> \documentclass[12pt]{article}
>> \usepackage[letterpaper,asymmetric=true, total={18cm,22cm},
>> top=3cm, bindingoffset=1cm]{geometry}
>> \usepackage[svgnames]{pstricks}
>> \usepackage{pst-plot,pst-infixplot}
>> \usepackage{pst-eucl}
>> \usepackage{pst-fun, pst-coil}
>> \usepackage{pst-solides3d}
>> \usepackage{pst-fun}
>> \usepackage{pstricks-add}
>>
>>
>> \begin{document}
>>
>> % With this viewpoint everything draws correctly
>>
>> \psset{viewpoint=30 10 30, Decran=50}
>> \begin{pspicture}[showgrid=false](-1.5,-3)(6.5,6)
>> \psSolid[object=grille,base=-3 3 -1 6,action=draw**, fillcolor=gray!20]
>>
>> \defFunction[algebraic]{G5}(t)
>> {t}{0.5*t^2}{0}
>> \defFunction[algebraic]{G6}(t)
>> {t}{0.5*t^2}{4}
>>
>> \psSolid[object=plan, definition=equation, fillcolor=Aquamarine, args={[0 1 0 0] }, base=-3 3 -4 0] % Tangent plane
>>
>>
>> \psSolid[object=cylindre, range=-3 2,h=4, function=G5, axe=0 0 1, incolor=cyan!50, fillcolor=yellow!50, ngrid=3 8]
>>
>> \axesIIID(0,4.5,0)(4,6,5)
>> \end{pspicture}
>>
>>
>> % Changed the viewpoint and the plane disappears
>>
>> \psset{viewpoint=30 -10 30, Decran=50}
>> \begin{pspicture}[showgrid=false](-1.5,-3)(6.5,6)
>> \psSolid[object=grille,base=-3 3 -1 6,action=draw**, fillcolor=gray!20]
>>
>> \defFunction[algebraic]{G5}(t)
>> {t}{0.5*t^2}{0}
>> \defFunction[algebraic]{G6}(t)
>> {t}{0.5*t^2}{4}
>>
>> \psSolid[object=plan, definition=equation, fillcolor=Aquamarine, args={[0 1 0 0] }, base=-3 3 -4 0] % Tangent plane - oops? Where did it go?
>>
>>
>> \psSolid[object=cylindre, range=-3 2,h=4, function=G5, axe=0 0 1, incolor=cyan!50, fillcolor=yellow!50, ngrid=3 8]
>>
>> \axesIIID(0,4.5,0)(4,6,5)
>> \end{pspicture}
>>
>>
>> \end{document}
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Sat, 9 Jun 2012 18:21:38 +0200
>> From: Kin Mye <kinmye at gmail.com>
>> To: Graphics with PSTricks <pstricks at tug.org>
>> Subject: [pstricks] problem with pscustom
>> Message-ID:
>> <CAMsKjuBECxLdMqHkBwsq2tPvqv=HfEprpZYJN84UDdrAGY218A at mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>>> download>http://archiv.dante.de/~herbert/Ubuntu/eitl.sh <http://archiv.dante.de/%7Eherbert/Ububtu/eitl.sh>
>>
>>> make it executable with "chmod 744 eitl.sh"
>>> and run it with "./eitl.sh"
>>
>> Dear Herbert,
>> Thank you very much for this script. I have run it without any
>> problem. Now I have an updated version!
>>
>> The bad news is that the update did not solve the problem ...
>> The good news: I manage to narrow down the problem. It seems it is
>> related with 'evince', the pdf viewer.
>>
>> The process I follow: latex + dvips + ps2pdf14 and evince to see the .pdf.
>>
>> - evince myfile.ps : ok
>> - evince myfile.pdf: wrong (see the atached png)
>> - acroread myfile.pdf: ok
>> - print from evince myfile.pdf: printing ok.
>>
>> I attach the .pdf file and the screenshot of what I see with evince myfile.pdf.
>>
>> I have done around 100 figures with pstricks (mainly psplot and block diagrams)
>> and the only problem I have found is the one I mention here: drawing
>> the area under a function.
>> This happened from approx. 2 years ago.
>>
>> BR.
>>
>> \listfiles
>> \documentclass{article}
>> \usepackage{pstricks-add}
>> \begin{document}
>> \begin{pspicture}(-1,-1)(3,6)
>> \pscustom[algebraic,linestyle=none,fillstyle=hlines]{%
>> \psplot{0}{1.5}{x^2}
>> \psline(1.5,0)(0,0)
>> }
>> \psaxes{->}(3,4)
>> \psplot[algebraic]{0}{2}{x^2}
>> \end{pspicture}
>> \end{document}
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <http://tug.org/pipermail/pstricks/attachments/20120609/93905c1f/attachment-0001.html>
>> -------------- next part --------------
>> A non-text attachment was scrubbed...
>> Name: myfile.pdf
>> Type: application/pdf
>> Size: 5216 bytes
>> Desc: not available
>> URL: <http://tug.org/pipermail/pstricks/attachments/20120609/93905c1f/attachment-0001.pdf>
>> -------------- next part --------------
>> A non-text attachment was scrubbed...
>> Name: screenshot.png
>> Type: image/png
>> Size: 5418 bytes
>> Desc: not available
>> URL: <http://tug.org/pipermail/pstricks/attachments/20120609/93905c1f/attachment-0001.png>
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Sat, 9 Jun 2012 18:28:34 +0200
>> From: Herbert Voss <Herbert.Voss at FU-Berlin.DE>
>> To: Graphics with PSTricks <pstricks at tug.org>
>> Subject: Re: [pstricks] vanishing plane as function of viewpoint
>> Message-ID: <4FD379B2.5050503 at FU-Berlin.DE>
>> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
>>
>> Am 09.06.2012 17:28, schrieb Jon Joseph:
>>> Once again I am doing battle with the pst-solides3d package. Can someone explain to me why the tangent plane vanishes when I change the viewpoint?
>>
>>> \psSolid[object=plan, definition=equation, fillcolor=Aquamarine, args={[0 1 0 0] }, base=-3 3 -4 0] % Tangent plane
>>
>> that plane has only _one_ visible face, the one on the back is
>> _not_ visible by definition. You change the viewpoint in a way
>> that the plane is seen from it's back side which is not visible.
>> Change the definition of the plane so that it's direction vector
>> points to the viewpoint, eg args={[0 -1 0 0] 180}:
>>
>> \documentclass{article}
>> \usepackage[svgnames]{pstricks}
>> \usepackage{pst-solides3d}
>> \begin{document}
>> % With this viewpoint everything draws correctly
>>
>> \psset{viewpoint=30 10 30, Decran=50}
>> \begin{pspicture}[showgrid=false](-1.5,-3)(6.5,6)
>> \psSolid[object=grille,base=-3 3 -1 6,action=draw**,fillcolor=gray!20]
>> \defFunction[algebraic]{G5}(t){t}{0.5*t^2}{0}
>> \defFunction[algebraic]{G6}(t){t}{0.5*t^2}{4}
>> \psSolid[object=plan,definition=equation,fillcolor=Aquamarine,
>> incolor=black!10,args={[0 1 0 0] }, base=-3 3 -4 0] % Tangent plane
>> \psSolid[object=cylindre,range=-3 2,h=4,function=G5,axe=0 0 1,
>> incolor=cyan!50, fillcolor=yellow!50, ngrid=3 8]
>> \axesIIID(0,4.5,0)(4,6,5)
>> \end{pspicture}
>> % Changed the viewpoint and the plane disappears
>>
>> \psset{viewpoint=30 -10 30, Decran=50}
>> \begin{pspicture}[showgrid=false](-1.5,-3)(6.5,6)
>> \psSolid[object=grille,base=-3 3 -1 6,action=draw**, fillcolor=gray!20]
>> \defFunction[algebraic]{G5}(t){t}{0.5*t^2}{0}
>> \defFunction[algebraic]{G6}(t){t}{0.5*t^2}{4}
>> \psSolid[object=cylindre, range=-3 2,h=4, function=G5, axe=0 0 1,
>> incolor=cyan!50, fillcolor=yellow!50, ngrid=3 8]
>> \psSolid[object=plan,definition=equation, fillcolor=Aquamarine,
>> args={[0 -1 0 0] 180}, base=-3 3 -4 0]
>> \axesIIID(0,4.5,0)(4,6,5)
>> \end{pspicture}
>>
>> \end{document}
>>
>> Herbert
>>
>>
>> ------------------------------
>>
>> _______________________________________________
>> PSTricks mailing list
>> PSTricks at tug.org
>> http://tug.org/mailman/listinfo/pstricks
>>
>>
>> End of PSTricks Digest, Vol 113, Issue 8
>> ****************************************
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Sat, 9 Jun 2012 18:44:14 +0200
> From: Herbert Voss <Herbert.Voss at FU-Berlin.DE>
> To: <pstricks at tug.org>
> Subject: Re: [pstricks] vanishing plane
> Message-ID: <4FD37D5E.6040709 at FU-Berlin.DE>
> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
>
> Am 09.06.2012 18:39, schrieb Jon Joseph:
>> Ok. I get it. But I gotta say that just seems wrong given the fact that my cylindrical surface is still visible from both viewpoints even though it also has a front and a back.
>
> yes, but it has a defined color for the the outside and the inside
>
> Herbert
>
>
> ------------------------------
>
> Message: 4
> Date: Sat, 9 Jun 2012 18:56:16 +0200
> From: Herbert Voss <Herbert.Voss at FU-Berlin.DE>
> To: <pstricks at tug.org>
> Subject: Re: [pstricks] vanishing plane
> Message-ID: <4FD38030.2040707 at FU-Berlin.DE>
> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
>
> Am 09.06.2012 18:44, schrieb Herbert Voss:
>> Am 09.06.2012 18:39, schrieb Jon Joseph:
>>> Ok. I get it. But I gotta say that just seems wrong given the fact
>>> that my cylindrical surface is still visible from both viewpoints even
>>> though it also has a front and a back.
>>
>> yes, but it has a defined color for the the outside and the inside
>
> use the object face instead, if you want both side visible.
> A face object is by default in the x-y plane, but can be
> rotated.
>
> \documentclass{article}
> \usepackage[svgnames]{pstricks}
> \usepackage{pst-solides3d}
>
> \begin{document}
>
> \psset{viewpoint=30 10 30, Decran=50}
> \begin{pspicture}[showgrid=false](-1.5,-3)(6.5,6)
> \psSolid[object=grille,base=-3 3 -1 6,action=draw**,fillcolor=gray!20]
> \defFunction[algebraic]{G5}(t){t}{0.5*t^2}{0}
> \defFunction[algebraic]{G6}(t){t}{0.5*t^2}{4}
> \psSolid[object=face,fillcolor=Aquamarine,incolor=red,
> RotX=90, base=-3 4 -3 0 3 0 3 4]
> \psSolid[object=cylindre,range=-3 2,h=4,function=G5,axe=0 0 1,
> incolor=cyan!50, fillcolor=yellow!50, ngrid=3 8]
> \axesIIID(0,4.5,0)(4,6,5)
> \end{pspicture}
> % Changed the viewpoint and the plane disappears
>
> \psset{viewpoint=30 -10 30, Decran=50}
> \begin{pspicture}[showgrid=false](-1.5,-3)(6.5,6)
> \psSolid[object=grille,base=-3 3 -1 6,action=draw**, fillcolor=gray!20]
> \defFunction[algebraic]{G5}(t){t}{0.5*t^2}{0}
> \defFunction[algebraic]{G6}(t){t}{0.5*t^2}{4}
> \psSolid[object=cylindre, range=-3 2,h=4, function=G5, axe=0 0 1,
> incolor=cyan!50, fillcolor=yellow!50, ngrid=3 8]
> \psSolid[object=face,fillcolor=Aquamarine,incolor=red,
> RotX=90, base=-3 4 -3 0 3 0 3 4]
> \axesIIID(0,4.5,0)(4,6,5)
> \end{pspicture}
>
> \end{document}
>
>
> Herbert
>
>
> ------------------------------
>
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
>
>
> End of PSTricks Digest, Vol 113, Issue 9
> ****************************************
More information about the PSTricks
mailing list