MathGroup Archive 2005

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

Search the Archive

Re: Bug in Graphics output of Circle primitive?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg62905] Re: [mg62860] Bug in Graphics output of Circle primitive?
  • From: "David Park" <djmp at earthlink.net>
  • Date: Thu, 8 Dec 2005 00:04:51 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Yves,

In this case I think the problem is associated with not using an Automatic
AspectRatio. The following appears to give a proper intersection.

r = 10000;
gx = Circle[{r, 0}, r, {179 °, 180 °}];
Show[Graphics[
      {Red, gx,
        Black, AbsolutePointSize[8], Point[{0, 0}]}],
    AspectRatio -> Automatic,
    Frame -> True,
    Axes -> {True, False},
    PlotRange -> {{-0.1, 1}, {-0.1, 1}}, AxesOrigin -> {0, 0}];

Of course, you don't always have to use Circle. You could parametrize the
circle. The following uses the Cardano3 package and draws the circle arc as
a ComplexCurve. There is no problem with the default AspectRatio and larger
PlotRange.

Needs["Cardano3`ComplexGraphics`"]

Draw2D[
    {AbsolutePointSize[8], Point[{0, 0}],
      Red, ComplexCurve[r + r Exp[I t °], {t, 179, 180}]},
    AspectRatio -> 1/GoldenRatio,
    Frame -> True,
    Axes -> {True, False},
    PlotRange -> {Automatic, Automatic},
    AxesOrigin -> {0, 0}];

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/



From: Yves Klett [mailto:yk at despammed.com]
To: mathgroup at smc.vnet.net


Dear Mathgroup,

I stumbled upon a strange (and suspicious) graphics output when
displaying arcs with small angular length.

If I evaluate the following lines:

r = 10000;
gx = Circle[{r, 0}, r, {179°, 180°}];
Show[Graphics[{gx, Point[{0, 0}]}], Axes -> True,
  PlotRange -> {Automatic, Automatic}, AxesOrigin -> {0, 0}];

(or the same in plain text format...)

r=10000;
gx=Circle[{r,0},r,{179\[Degree],180\[Degree]}];
Show[Graphics[{gx,Point[{0,0}]}],Axes\[Rule]True,
     PlotRange\[Rule]{Automatic,Automatic},AxesOrigin\[Rule]{0,0}];


I get the point as specified at the origin {0,0}. The arc though does
not intersect at the origin as it should IMHO, but somewhat left of it.
  Same thing occurs for arbitrary values of r.

There might be some precision problem of the postscript output
concerning the Circle primitive when very different axes scaling is
used, but any enlightment would be appreciated.

I am using V5.2 on windows. Any hints or tips to get rid of this faulty
output would be very welcome,

Yves Klett



  • Prev by Date: Re: Types in Mathematica thread
  • Next by Date: Re: Types in Mathematica, a practical example
  • Previous by thread: Re: Bug in Graphics output of Circle primitive?
  • Next by thread: Re: Bug in Graphics output of Circle primitive?