[Xy-pic] Colour only a pice of curve

Diego dgtorpedo at gmail.com
Tue Sep 1 11:56:31 CEST 2015


Actually, I notice that the code I wrote is a little bit verbose, so the
following one is better (it's not the solution):

%----
\begin{xy}
(0,0)*{0}="o";<5mm,0mm>:<0mm,5mm>::,
(5,8)*{1}="b", (-5,0)="c", (5,0)="d",

(-1.5,2.5)="c1", (1.5,2.5)="c2",
(-4,10)="d1", (4,10)="d2",
(0,5)="q1", (2,9)="q2",

"o";"b" **\crv{"q1"&"q2"}
?!{"c";"d" **\crv{"c1"&"c2"}}*@{>}="i1"
?!{"c";"d" **\crv{"d1"&"d2"}}*@{<}="i2",
\end{xy}
%----

2015-09-01 10:35 GMT+02:00 Diego <dgtorpedo at gmail.com>:

> Hi,
> in reference to the following piece of code, I'm trying to paint the curve
> from 0 to 1 in a different colour but only between the intersection
> points "i1" and "i2".
>
> %----
> \begin{xy}
> (0,0)*{0}="o";<5mm,0mm>:<0mm,5mm>::,
> (5,8)*{1}="b", (-5,0)="c", (5,0)="d",
>
> (-1.5,2.5)="c1", (1.5,2.5)="c2",
> "c";"d" **\crv{"c1"&"c2"},
>
> (-4,10)="d1", (4,10)="d2",
> "c";"d" **\crv{"d1"&"d2"},
>
> (0,5)="q1", (2,9)="q2",
> "o";"b" **\crv{"q1"&"q2"}
> ?!{"c";"d" **\crv{~**{}"c1"&"c2"}}*@{>}="i1"
> ?!{"c";"d" **\crv{~**{}"d1"&"d2"}}*@{<}="i2",
> \end{xy}
> %----
> [image: Immagine incorporata 2]
> At the moment my workaround is to crate three \crv:
> - from 0 to "i1";
> - from "i1" to "i2" using the syntax "i1";"i2" **[colour]\crv{..&..};
> - from "i2" to 1.
>
> With a software like Geogebra I can find the rights coordinates of the
> control points so that the result seems to be only one Bezier curve, but
> it's a lot of work.
>
> Is there a more simple way to achieve the same result?
>
> Thanks
>
> --
> Diego
>
>


-- 
Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xy-pic/attachments/20150901/99394c48/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crv-incomplete.png
Type: image/png
Size: 8006 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20150901/99394c48/attachment-0001.png>


More information about the xy-pic mailing list