# [Xy-pic] half-solid ellipse

Ross Moore ross at ics.mq.edu.au
Tue Mar 29 00:20:22 CEST 2005

```Hello Chris,

On 28/03/2005, at 5:14 AM, Chris Brav wrote:

> hi. i'm trying to make 2D cobordism diagrams. i like to draw them from
> left to right, with solid circles on the in direction (left-hand) and
> half-solid,
> half-dotted circles on the out direction (right-hand), with the solid
> half
> "out front" and the dotted half "behind". a. lauda's code does this
> for diagrams drawn
> from top to bottom, but i can't get it to work from left to right.
>
> here is my code:
>
> \[ \xy
> (7,0)*\ellipse(1,3){.};
> (7,0)*\ellipse(1,3)__,=:a(270){-};
> (0,2.5)*\ellipse(1,3){-};
> (0,-2.5)*\ellipse(1,3){-};

Try this:

\[ \xy
(7,0)*\ellipse(1,3){.};
(7,0)*\ellipse(1,3):a(0),^,=:a(90){-},
\save(0,0);(0,-1)::,
(7,0)*\ellipse(1,3):a(0),^,=:a(-90){-},
\restore\POS
(0,2.5)*\ellipse(1,3){-};
(0,-2.5)*\ellipse(1,3){-};

It does the solid part in 2 pieces, using a coordinate
transformation before doing the 2nd piece.
This is apparently necessary because:

"...only the slope of <dir>p and <dir>c is significant;
rotations by 180o being immaterial."

(from Xy-pic Reference Manual, Chapter 29.3 on xyarc )

> (14,3)*{}="TR";
> (14,-3)*{}="BR";
> (0,8)*{}="TTL";
> (0,2)*{}="TBL";
> (0,-2)*{}="BTL";
> (0,-8)*{}="BBL";
> (10,3)*{}="A";
> (10,-3)*{}="B";
> "TTL";"A" **\crv{(5,8) & (3,4)};
> "A";"TR" **\dir{-};
> "BBL";"B" **\crv{(5,-8) & (3,-4)};
> "B";"BR" **\dir{-};
> "TBL";"BTL" **\crv{(3,2) & (3,-2)};
> \endxy \]
>
> the trouble is line #3. i presume =:a() is supposed to set an angle,
> but
> no matter what angle i try, i can't get rid of the extra solid part
> showing from "behind".

You are doing an elliptical arc that needs to "turn-on" twice,
(when starting at the right-hand edge) while drawing around the
full ellipse. Currently \ellipse only turns on/off once each.

To do it in a single arc, you would need to start at the bottom
and turn off at the top. To do this, you'd need to rotate the
current direction first; e.g.,

(7,0);p-(0,3)**{},(7,0)*\ellipse(1,3):a(90),^,=:a(180){-},

>
> any suggestions?

Hope this helps,

Ross

BTW, I like your nice elegant diagram.
Very smooth indeed.

>
> chris brav
>
> _______________________________________________
> xy-pic mailing list
> http://tug.org/mailman/listinfo/xy-pic
>
------------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia                                  fax: +61 +2 9850 8114
------------------------------------------------------------------------

```