• To: mathgroup at smc.vnet.net
• Subject: [mg17143] Re: ParametricPlot help please
• From: "Allan Hayes" <hay at haystack.demon.co.uk>
• Date: Sat, 17 Apr 1999 03:35:26 -0400
• References: <7es30f\$cbh@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Rob,
What is suitable depends on hw you want to use the  code, but here is a
simple way of getting your plot.

ParametricPlot[#, {u, -Pi, Pi},
AspectRatio -> Automatic
]&[
{(u+1+Exp[u]Cos[#])/Pi,(#+ Exp[u])/Pi}&/@{
Pi/1.2, Pi/1.5, Pi/2, Pi/4, Pi/8, Pi/16
}
]

The behaviour of slot functions like  (#1+ #2 #3 )& is as follows

With
a=va,b=vb; c=vc

the evaluation steps are

(#1+ #2 #3 )&[a,b.c]
(#1+ #2 #3 )& [va,vb,vc]
(va+vb vc)

Allan

---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

Rob Peterson <robpeterson at iname.com> wrote in message
news:7es30f\$cbh at smc.vnet.net...
> Some time ago several kind souls on this ng helped me do some conformal
> transformation plots (this one is part of the curves describing the fields
> in a parallel plate capacitor).  We used a series of ParametricPlots.  Now
> I would like to understand how this worked - maybe I can learn something
> about Mathematica.  I think I get the use of Map[] but I am stuck on the
use of
> ParametricPlot[#1,.....].  I have looked high and low and I do not find
any
> mention of the #1 parameter.  If I ever get thru this, I'll start trying
to
> understand the Partition[Thread[].... ]  part.
>
> Here's the code.  Any help/suggestions appreciated.
>
> By the way, I got about 5 good suggestions on how to do these plots. Some
> were faster, some more understandable, but all had more characters than
the
> code below:
>
> (* part of conformal transformation for parallel plate capacitor *)
> x[u_,v_]:=(u+1+Exp[u] Cos[v])/\[Pi];
> y[u_,v_]:=(v+ Exp[u] Sin[v])/\[Pi];
>
> {a,b,c,d,e,f} =
>   Map[ParametricPlot[#1, {u,-Pi,Pi},AspectRatio->Automatic,
>         DisplayFunction->Identity]&,
>          {x[u,v],y[u,v]}/.
>
>  Show[{a,b,c,d,e,f}, DisplayFunction->\$DisplayFunction]
>
> Thanks, Rob
>
>
>
>
> robpeterson at iname.com
> <http://www.flash.net/~eterson>
>

```

• Prev by Date: Re: List of function-heads
• Next by Date: Re: Strange ReplaceRepeated