Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7642 > unrolled thread

ListPolarPlot questions

Started by"Eric Michielssen" <emichiel@eecs.umich.edu>
First post2012-01-07 10:30 +0000
Last post2012-01-08 09:22 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  ListPolarPlot questions "Eric Michielssen" <emichiel@eecs.umich.edu> - 2012-01-07 10:30 +0000
    Re: ListPolarPlot questions Ashwini <aksingh21@gmail.com> - 2012-01-08 09:22 +0000

#7642 — ListPolarPlot questions

From"Eric Michielssen" <emichiel@eecs.umich.edu>
Date2012-01-07 10:30 +0000
SubjectListPolarPlot questions
Message-ID<je96ru$j8k$1@smc.vnet.net>
Mathgroup:

I have two questions regarding the use of ListPolarPlot.

1. The function I'd like to plot is periodic.  Suppose I have samples of it
at equispaced angles, the first one for angle zero, and the last one for 2
Pi; the data for 0 and 2 Pi is identical.  I want to plot the function for
all angles, from 0 to 2 Pi, connected by a smooth line.  Choosing options
joined -> True and  InterpolationOrder -> 2 almost does the trick, except
that there is a kink in the graph at phi = 0.  As the interpolator does not
know the function is periodic.  Is there a way around that?

Example: g1 =  ListPolarPlot[Table[phi = (i - 1) 2 Pi/10; Cos[phi]^2, {i, 1,
11}], 
 DataRange -> {0., 2 Pi}, Axes -> None, Joined -> True, 
 InterpolationOrder -> 2]

(In practice my table is numerically derived, not that of a Cos^2 function)

2.  Suppose I want to plot a circle centered away from the origin, and then
the above g1 centered about the same point.  How do I do that?

Example:

g1 = Graphics[
   ListPolarPlot[Table[phi = (i - 1) 2 Pi/10; Cos[phi]^2, {i, 1, 11}],
     DataRange -> {0., 2 Pi}, Axes -> None, Joined -> True, 
    InterpolationOrder -> 2]];
g2 = Graphics[Circle[{1., 1.}, 1]];
Show[g1, g2]

But now with the center of g1 shifted to {1,1} (and, if possible, smooth
about phi = 0...).  I presume this can be done using Offset but I cannot get
that to work.

Thanks,
Eric Michielssen



[toc] | [next] | [standalone]


#7659

FromAshwini <aksingh21@gmail.com>
Date2012-01-08 09:22 +0000
Message-ID<jebn8a$17a$1@smc.vnet.net>
In reply to#7642
On Jan 7, 10:30 am, "Eric Michielssen" <emich...@eecs.umich.edu>
wrote:
> Mathgroup:
>
> I have two questions regarding the use of ListPolarPlot.
>
> 1. The function I'd like to plot is periodic.  Suppose I have samples of it
> at equispaced angles, the first one for angle zero, and the last one for 2
> Pi; the data for 0 and 2 Pi is identical.  I want to plot the function for
> all angles, from 0 to 2 Pi, connected by a smooth line.  Choosing options
> joined -> True and  InterpolationOrder -> 2 almost does the trick, except
> that there is a kink in the graph at phi = 0.  As the interpolator does not
> know the function is periodic.  Is there a way around that?
>
> Example: g1 =  ListPolarPlot[Table[phi = (i - 1) 2 Pi/10; Cos[phi]^2, {i, 1,
> 11}],
>  DataRange -> {0., 2 Pi}, Axes -> None, Joined -> True,
>  InterpolationOrder -> 2]
>
> (In practice my table is numerically derived, not that of a Cos^2 function)
>
> 2.  Suppose I want to plot a circle centered away from the origin, and then
> the above g1 centered about the same point.  How do I do that?
>
> Example:
>
> g1 = Graphics[
>    ListPolarPlot[Table[phi = (i - 1) 2 Pi/10; Cos[phi]^2, {i, 1, 11}],
>      DataRange -> {0., 2 Pi}, Axes -> None, Joined -> True,
>     InterpolationOrder -> 2]];
> g2 = Graphics[Circle[{1., 1.}, 1]];
> Show[g1, g2]
>
> But now with the center of g1 shifted to {1,1} (and, if possible, smooth
> about phi = 0...).  I presume this can be done using Offset but I cannot get
> that to work.
>
> Thanks,
> Eric Michielssen

1. Increasing  the InterpolationOrder to 3 connects the center.
2. the center of the circle is at {1,1} shouldn't it be {0,0}

Regards,
aks

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web