# [Xy-pic] Help with ellipse syntax (angles)

David Sevilla sevillad at gmail.com
Wed Jan 13 17:32:41 CET 2010

```Hi,

I am a half beginner, and I have stumbled upon some things beyond my
usual basic diagrams, which I cannot figure out. I would appreciate
any help.

I am trying to draw the part of an ellipse contained inside a triangle
(basically, three arcs of the same ellipse) but so far I have been
unable, probably due to my lack of understanding of the syntax. I am
using the following (I do not understand most of the symbols after the
axes lengths, and playing with them did not give me much insight). I
somehow guessed that I can use the first angle to "point" the
beginning and the last angle to indicate how much do I want to cover.
Example, 1/4 of an ellipse:

\[\xy
(0,0)*{*}; (0,-10); **\dir{};
(0,0)*{\ellipse(30,5):a(0),^,=:a(90){}};
\endxy\]

Now, if I substitute 90 by 45, instead of 1/8 of an ellipse I get a
tiny arc, but it does work properly if I make both axes equal. It
seems to me that somehow the angle is first computed and later
"squeezed" down. I don't understand this but I can survive without it
for my current purposes (I hope).

But my original ellipse is skewed, so I start with a coordinate change
(some visual help added):

\[\xy
(13,5)="c"; "c"+(.6,.1):
(0,0)*{*}; (0,-10); **\dir{.};
"c",{\ellipse(30,5):a(0),^,=:a(90){}}; % here I had to change the "c"*
into "c", because the ellipse is displaced otherwise
\endxy\]

Now one can see that the ellipse does not start on top of the "*" as
per the new coordinates, but a bit to the right (!). In addition,
changing the basis .1 to .4 restores normality. Other values give
again slight variations which I don't understand.

More to the point, when I try to fine-tune my ellipse arcs, I run into
problems. Compare the arcs below, which should differ in one degree:

\[\xy
(0,0)="c";
(13,5)="c"; "c"+(.6,.1):
(0,0)*{*}; (0,-10); **\dir{.};
"c",{\ellipse(30,5):a(91),^,=:a(90){}};
"c",{\ellipse(30,5):a(90),^,=:a(90){=}};
\endxy\]

(For a more dramatic case, change the 5 into 15.) Needless to say,
with such jumps I cannot manage to make my arcs start exactly where I
want. Any suggestions?

Thanks a lot,

David

--
Dr. David Sevilla González
RICAM, Austrian Academy of Sciences
Altenbergerstraße 69
A-4040 Linz, Austria

Telephone: +43 732 2468 5253
Fax:       +43 732 2468 5212
david.sevilla at oeaw.ac.at
http://www.davidsevilla.com

```

More information about the xy-pic mailing list