[Xy-pic] Draw a partial circle segment

Ross Moore ross.moore at mq.edu.au
Wed Jul 1 06:29:57 CEST 2015

```Hello Diego,

On 19/06/2015, at 5:48 PM, Diego wrote:

> Hi,
> I can't figure out if is possible or not draw a partial circle segment
> between to arbitrary direction.
>
> The manual says:
> *\cir<radius>{<diag> <orient> <diag>}
>
> I want draw the part of the full circle, with radius 5mm, that starts from
> (3.5,3.5) and ends in (2.2,4.5), so I use the command:
>
>
> (0,0)*\cir<5mm>{v(3.5,3.5)^v(2.2,4.5)}
>
> but it's completely wrong!
> Which is the correct syntax?

The Xy-pic Reference manual gives the syntax.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen shot 2015-07-01 at 1.22.54 PM.png
Type: image/png
Size: 15444 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20150701/b191c134/attachment-0001.png>
-------------- next part --------------

Only quarter- and half- and three-quarter circles, aligning
with the usual rectangular axes, can be obtained this way.

This is not the feature that you want, for arbitrary arcs
of circles or ellipses.
You need to look at the  xyarc  feature; also described in the
Reference Manual, ?30 pp.58?62.

The command is  \ellipse  which has a comprehensive set of parameter
options, allowing various ways to specify exactly what you want to see.

Your specification
"with radius 5mm, that starts from (3.5,3.5) and ends in (2.2,4.5) "
is incomplete and perhaps contradictory.

What are the units for your coordinates?
Where should the circle's centre be?
Do you want the shorter or longer arc for any circle that may exist?

Here is a possible interpretation, which ignores the 5mm radius.

\usepackage[all,arc]{xy}

\xy /r3mm/:
(0,0)*{+}*++!U\txt{Origin}
\POS(2.2,4.5)*@{*}="p",*+!RD{p},"p";
\POS(3.5,3.5)*@{*}="c",*+!UL{c},"c",
{\ellipse_{.}},
{\ellipse^{-}}
\endxy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: texshop_image.jpeg
Type: image/jpeg
Size: 15832 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20150701/b191c134/attachment-0001.jpeg>
-------------- next part --------------

>
> Thanks.
>
> --
> Diego

Hope this helps,

Ross

```

More information about the xy-pic mailing list