Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Bug or feature ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72440] RE: [mg72368] Bug or feature ?
  • From: "David Annetts" <davidannetts at aapt.net.au>
  • Date: Thu, 28 Dec 2006 04:47:48 -0500 (EST)

Hi Giovanni,

> Please, try this with Mathematica (5.2):
> << Graphics`Graphics`
> 
> PolarPlot[Sin[t]^2 Cos[t]^2, {t, 0, 2Pi}]
> 
> PolarPlot[Sin[t]^2 Cos[t]^2, {t, 0, 21}]
> 
> compare the two graphics.
> 
> In the second (t is between zero and twentyone) I got a 
> spurios segment between 3rd and 4th quadrants.
> 
> Can you tell me why ?
> 
> (Btw, I got this just playing for one minute or two with 
> PolarPlot. The "21" was a typo...)

It's a feature!

The effect you see is caused by not sampling your function finely enough.
You can get another spurious segment using 

	PolarPlot[Sin[t]^2 Cos[t]^2, {t, 0, 21}, PlotPoints -> 13]

And this suggests the cure ....

Increasing the number of plot points results in a correct plot.
Interestingly, reducing it (from the default of 25) also works (eg
PlotPoints->20) provided you don't hit a pathological value like (eg) 13.

For effects like this, the cure usually lies in fine tuning any of the
values of PlotPoints, MaxBend or PlotDivision.  For another feature, look at


	PolarPlot[Sin[t]^2 Cos[t]^2, {t, 0, 21}, PlotDivision -> 4].

Regards,

Dave.


  • Prev by Date: Re: nestled plotting
  • Next by Date: Re: ReplaceAll applied to List
  • Previous by thread: Re: Bug or feature ?
  • Next by thread: Re: RootSearch Performance