[pstricks] pst-lens and pst-fill interaction again

halbard7 at aol.com halbard7 at aol.com
Tue Aug 22 13:03:08 CEST 2006


Thanks for the advice on macros, Herbert. The solution you give to the lens-fill interaction is most welcome. 
 
Thanks.
 
However(!), I believe you may have sidestepped just a little. As you can see, I am trying to magnify an element of area. This should *not* look like a rectangle in the magnifier, i.e. the region should extend all the way up to the edge of the glass. I can't see how to do this without strange artefacts appearing in the output.
 
By the way, I really appreciate the time and expertise you devote to us pstricks users. As a token of that, I have recently purchased your book. For a non-German speaker like me it is a great read, but I have used the summaries and examples countless times. I recommend it to everyone I meet, which means I often get some very strange looks.
 
 
 
-----Original Message-----
From: pstricks-request at tug.org
To: pstricks at tug.org
Sent: Tue, 22 Aug 2006 11.00AM
Subject: pstricks Digest, Vol 43, Issue 17


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: Strange interaction between pst-lens and pst-fill
      (Herbert Voss)
   2. behavior of arrows when plotting functions and scaling
      (Ryan Higginbottom)
   3. Re: behavior of arrows when plotting functions and    scaling
      (Herbert Voss)
   4. Re: Solid mathematical surfaces with pst-3dplot (Paul Smith)


----------------------------------------------------------------------

Message: 1
Date: Mon, 21 Aug 2006 16:06:45 +0200
From: Herbert Voss <LaTeX at zedat.fu-berlin.de>
Subject: Re: [pstricks] Strange interaction between pst-lens and
    pst-fill
To: Graphics with PSTricks <pstricks at tug.org>
Message-ID: <44E9BDF5.30409 at zedat.fu-berlin.de>
Content-Type: text/plain; charset=us-ascii; format=flowed

halbard7 at aol.com wrote:
> Please take a look at the following code: evidence of bugs or brain 
> damage? Troubled lines
> prefixed with %-> below. Using MikTeX 2.4 and dvips.

yes, that is a bit tricky here. However, I would use
a filling with lines, e.g. fillstyle=vlines; or a color.
And by the way: you shouldn't use macronames with one
letter; LaTeX uses this often for its own.

Herbert


\listfiles
\documentclass{article}
\usepackage{pstricks}
\usepackage{pst-plot}
\usepackage{pst-lens}
\usepackage{pst-fill}

\newcommand{\f}{\mathrm{f}}
\renewcommand{\d}[1]{\mathop{\mathrm{d}#1}\nolimits}
  %
\psset{unit=1.75cm}

\def\incircle{\pspicture(2mm,2mm)\psdot(1mm,1mm)\endpspicture}
%
\def\PSTBox{%
   \rput[lb](0,0){%
   \begin{minipage}{9cm}%
%  \rule{0pt}{5.25cm}%
       \pscustom[fillstyle=solid,fillcolor=black!10]{%
         \psline(0.5,0)(0.5,2.3)
         \psecurve(0,1.8)(0.5,2.3)(2,2.7)(3,2.4)(4.5,1.6)(5,1.5)
         \psline(4.5,1.6)(4.5,0)(0.5,0)}%
     \psaxes[labels=none,ticks=none]{->}(0,0)(-.2,-.2)(5,3)%
     \pscurve(0,1.8)(0.5,2.3)(2,2.7)(3,2.4)(4.5,1.6)(5,1.5)%
     \uput[r](5,1.5){$y=\f(x)$}\psline(2,0)(2,2.7)%
     \uput[d](2,0){$\d x$}\psdots(2,2.7)%
     \uput[ur](2,2.7){$(x,y)$}%
     \uput[d](0.5,0){$a$}\uput[d](4.5,0){$b$}%
     \uput[r](5,0){$x$}\uput[l](0,3){$y$}%
%    \psboxfill{\incircle}\psframe[fillstyle=boxfill](1.6,0)(2.3,1)%
     \psframe[fillstyle=solid,fillcolor=blue](1.65,0)(2.35,1)% alternative
     \psline(.95,0)(2.95,0)\psline(1.65,0)(1.65,1)\psline(2.35,0)(2.35,1)%
     \uput[d](1.65,0){$\mathstrut x$}\uput[d](2.35,0){$\mathstrut x+\d x$}%
\end{minipage}}}
\begin{document}

\psframebox[shadow=true]{%
\begin{pspicture}(-1,-1.5)(6.2,3.5)
\PSTBox%
\PstLens[LensSize=1.5,LensRotation=75,LensMagnification=1.5](2,0.2){\PSTBox}
\end{pspicture}}

\end{document}




------------------------------

Message: 2
Date: Mon, 21 Aug 2006 12:45:51 -0700 (PDT)
From: Ryan Higginbottom <mathalot at yahoo.com>
Subject: [pstricks] behavior of arrows when plotting functions and
    scaling
To: pstricks at tug.org
Message-ID: <20060821194551.7868.qmail at web30801.mail.mud.yahoo.com>
Content-Type: text/plain; charset=iso-8859-1

It seems to me that the commands \psline and \psplot have different
behaviors with respect to arrowheads, and I was wondering if there is a
way to correct the behavior of \psplot in this regard.  The example I
include below is very simple, but it illustrates the problem I'm having
with something a bit more complex.  I would like to use the arrows=<-o
option, but when I scale the units, the arrowheads seem to be slightly
misplaced.  (Note: this doesn't seem to happen when the units are left
alone.)

When you compile the example below and magnify a bit, you will see what I
mean.  The arrows on the top line are off a bit.  (I am trying to write
something for a powerdot presentation, so even though the magnification
may seem insignificant here, it is clear when on the presentation.)

Thank you for your help.

Example:
--------------------
\documentclass{article}
\listfiles
\usepackage{pstricks}
\usepackage{pstricks-add}

\begin{document}
\psset{xunit=.5cm,yunit=.5cm}
\psline[arrows=<-o,linewidth=1pt](0,0)(2,0)
\psplot[arrows=<-o,linewidth=1pt]{0}{2}{1}
\end{document}
--------------------
 *File List*
 article.cls    2005/09/16 v1.4f Standard LaTeX document class
  size10.clo    2005/09/16 v1.4f Standard LaTeX file (size option)
pstricks.sty    2005/12/19 v0.31 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex    2006/02/06 v1.14a `PSTricks' (tvz)
  xcolor.sty    2005/12/21 v2.09 LaTeX color extensions (UK)
   color.cfg    2005/12/29 v1.1 MiKTeX 'color' configuration
   dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
pstricks-add.sty    2005/03/03 package wrapper for pstricks-add.tex (hv)
pstricks-add.tex    2006/06/17 v2.75 `PSTricks-add' (hv)
pst-xkey.tex    2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
 xkeyval.sty    2005/11/25 v2.5e package option processing (HA)
 xkeyval.tex    2005/11/25 v2.5e key=value parser (HA)
 ***********

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


------------------------------

Message: 3
Date: Mon, 21 Aug 2006 23:08:06 +0200
From: Herbert Voss <LaTeX at zedat.fu-berlin.de>
Subject: Re: [pstricks] behavior of arrows when plotting functions and
    scaling
To: Graphics with PSTricks <pstricks at tug.org>
Message-ID: <44EA20B6.7000607 at zedat.fu-berlin.de>
Content-Type: text/plain; charset=us-ascii; format=flowed

Ryan Higginbottom wrote:
> It seems to me that the commands \psline and \psplot have different
> behaviors with respect to arrowheads, and I was wondering if there is a
> way to correct the behavior of \psplot in this regard.  The example I
> include below is very simple, but it illustrates the problem I'm having
> with something a bit more complex.  I would like to use the arrows=<-o
> option, but when I scale the units, the arrowheads seem to be slightly
> misplaced.  (Note: this doesn't seem to happen when the units are left
> alone.)
> 
> When you compile the example below and magnify a bit, you will see what I
> mean.  The arrows on the top line are off a bit.  (I am trying to write
> something for a powerdot presentation, so even though the magnification
> may seem insignificant here, it is clear when on the presentation.)

plotpoints is set by default to 20. Choose a number of 5
and everything will be okay. Then one line segment has a length
larger than the arrow length, which is the problem here,
when having plotpoints > 10.

> \psplot[arrows=<-o,linewidth=1pt]{0}{2}{1}

\psplot[arrows=<-o,linewidth=1pt,plotpoints=5]{0}{2}{1}


Herbert




------------------------------

Message: 4
Date: Tue, 22 Aug 2006 08:24:42 +0100
From: "Paul Smith" <phhs80 at gmail.com>
Subject: Re: [pstricks] Solid mathematical surfaces with pst-3dplot
To: "Graphics with PSTricks" <pstricks at tug.org>
Message-ID:
    <6ade6f6c0608220024q37e8a7efg36086cce8bffe2e8 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 8/19/06, Herbert Voss <LaTeX at zedat.fu-berlin.de> wrote:
> > Sometime ago, I asked here whether it was possible with PSTricks to
> > draw a graph like the one attached. At that time, pst-3dplot could
> > approximately do that. I say 'approximately' as it could not draw the
> > surface without any grid. I am now asking whether pst-3dplot has
> > meanwhile got the ability to draw solid (without any grid)
> > mathematical surfaces.
>
> have a look at http://perce.de/LaTeX/pst-IIID/
> It is highly experimental, but the Example.pdf
> shows some surfaces of functions.
>
> Manuel is also working on a new pst-vue3d.
> Maybe he has some more ideas.

Thanks, Herbert. I hope that in future PSTricks will offer the
possibility of drawing solid mathematical surfaces _without_ any grid.

Paul


------------------------------

_______________________________________________
pstricks mailing list
pstricks at tug.org
http://tug.org/mailman/listinfo/pstricks


End of pstricks Digest, Vol 43, Issue 17
****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20060822/911b247d/attachment.html 


More information about the PSTricks mailing list