Message Boards Message Boards

Eliminating jagged and inaccurate plots

Posted 11 years ago
I am plotting parametric curves. The plots look smooth and continuous for plots with fewer, more loosely spaced "arms". However, for plots with more arms, more densely spaced, the plot looks jagged and inaccurate. Remedy?
xcoordinate[a_, b_, t_] := (a + b)*Cos[t] - b*Cos[(a + b)/b*t]
ycoordinate[a_, b_, t_] := (a + b)*Sin[t] - b*Sin[(a + b)/b*t]

ParametricPlot[{xcoordinate[1/4, 41/(4*4), t], ycoordinate[1/4, 41/(4*4), t]}, {t, 0, 82 Pi}, AspectRatio -> Automatic]
ParametricPlot[{xcoordinate[1/8, 359/(8*18), t], ycoordinate[1/8, 359/(8*18), t]}, {t, 0, 718 Pi}, AspectRatio -> Automatic]
POSTED BY: Bryan Lettner
3 Replies
Posted 11 years ago
Thanks, found the same answer on my own.  Should have looked harder first, my bad.  MaxRecursion must be 9 or higher for my plot to look proper.
POSTED BY: Bryan Lettner
Hi,

use MaxRecursion and PlotPoints options and  for ParametricPlot:
ParametricPlot[{xcoordinate[1/8, 359/(8*18), t],

  ycoordinate[1/8, 359/(8*18), t]}, {t, 0, 718 Pi},
AspectRatio -> Automatic, MaxRecursion -> 10]
I.M.
POSTED BY: Ivan Morozov
Posted 11 years ago
When something doesn't work often the first best thing to do is to go to the help page, for ParametricPlot in this case, and see the "Details and Options" that is near the top of almost every documentation page. Many many people don't seem to realize that opening that by clicking on it is the first thing to check. Click on that and look the explanation of how it works and look at every option that can be given to help control how the function will work.

If, for example, you add the option
, MaxRecursion -> 10
just before the end of your ParametricPlot function I think you may find enlightenment. You can also try 1 or 2 or 3 to see how that behaves. Choose the number that works best for your application.

If I could do it I would have "Details and Options" in blinking red text followed by "<--Click Me!"
POSTED BY: Bill Simpson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract