RE: ParametricPlot - a feature or a bug?
- To: mathgroup at smc.vnet.net
- Subject: [mg39459] RE: [mg39447] ParametricPlot - a feature or a bug?
- From: "David Park" <djmp at earthlink.net>
- Date: Mon, 17 Feb 2003 04:33:56 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Vladimir, Not a bug. ParametricPlot has a default for how many plot points and subdivisions it will use. Options[ParametricPlot, {PlotPoints, PlotDivision}] {PlotDivision -> 30., PlotPoints -> 25} Let's look at the most illustrative case. With... plot1 = ParametricPlot[{Cos[t], Sin[t]}, {t, 0, 500 Pi}, AspectRatio -> Automatic]; you obtain an inaccurate plot because you are only obtaining 3 or 4 points each time you traverse the circle. If more PlotPoints are used a better plot is obtained. ParametricPlot[{Cos[t], Sin[t]}, {t, 0, 500 Pi}, PlotPoints -> 1000, AspectRatio -> Automatic]; To understand better what is happening to your plot, let's extract the points that Mathematica used and plot them. pts = (First[plot1] /. Line[a_] :> a)[[1,1]]; Length[pts] 901 We have only 901 points for 250 circuits of the circle. If just the points are plotted a fairly good circle is obtained. Show[Graphics[ {Point /@ pts}], AspectRatio -> Automatic]; If only the first 15 points are used to draw a line, then you can see how an annular region will slowly be filled in. I believe the same phenomenon explains all of your cases. If Mathematica attempted to continue subdividing the plot until a smooth curve was obtained, it could easily fall into an infinite recursion, for example when the curve had a cusp. It is up to the user to specify an appropriate domain and number of plot points. Generally, better looking curves are obtained if regions are not retraced. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Vladimir Bondarenko [mailto:vvb at mail.strace.net] To: mathgroup at smc.vnet.net Hello, While trying to plot complex parametric plots with large values of the parameter I run into a problem which boils down to the following simple observation. a) ParametricPlot[{Cos[t], Sin[t]}, {t, 0, 1 Pi}, AspectRatio -> Automatic]; A perfect circumference. b) ParametricPlot[{Cos[t], Sin[t]}, {t, 0, 200 Pi}, AspectRatio -> Automatic]; Instead of a circumference, not a very wide annulus. c) ParametricPlot[{Cos[t], Sin[t]}, {t, 0, 500 Pi}, AspectRatio -> Automatic]; An annulus which width is equal to the radius of the inner circumference. d) ParametricPlot[{Cos[t], Sin[t]}, {t, 0, 1000 Pi}, AspectRatio -> Automatic]; A black ring with tiny white spots. e) ParametricPlot[{Cos[t], Sin[t]}, {t, 0, 10^19 Pi}, AspectRatio -> Automatic]; A funny net. f) ParametricPlot[{Cos[t], Sin[t]}, {t, 0, 10^20 Pi}, AspectRatio -> Automatic]; A segment. g) ParametricPlot[{Cos[t], Sin[t]}, {t, 0, 10^26 Pi}, AspectRatio -> Automatic]; Only the axes are shown. There is no graph itself. Is (at least a part of the shown output) a feature or a bug? (By the way, before answering why do not try to solve the same problems with a couple of other systems? ;-) Best wishes, Vladimir Bondarenko Mathematical and Production Director Symbolic Testing Group Web : No other my site is permitted to me to quote here http://www.CAS-testing.org/ GEMM Project (95% ready) Email: vvb at mail.strace.net Voice: (380)-652-447325 Mon-Fri 6 a.m. - 3 p.m. GMT ICQ : 173050619 Mail : 76 Zalesskaya Str, Simferopol, Crimea, Ukraine