Hi all,

One of the common symbols used in rigging topos is a deviation. It looks
like a solid line, ending with a horizontal ellipse. (The rope would
then pass through the centre of the ellipse, which is why it helps to
have a line point within the centre of the ellipse, to make it easy to
line them up with each other.)
     __
----(__)

In Therion's Metapost, the line is easy;
pickup PenC;
thdraw P;

Drawing a horizontal ellipse at the coordinates of the last point in the
line is easy:
p:=fullcircle xscaled (.5u) yscaled (.25u);
draw p shifted (point (length P) of P);

But making the last "leg" of the line stop at the point where it
intersects the ellipse ... I am baffled.

One method would be; work out the angle of the last part of the line,
work out the radius of the ellipse on that angle. Draw the line from the
previous point to the length minus the last "radius" length.

That's all fair and good, but when the line is curving, the radius of
the ellipse at the final direction where the line ends, and the radius
where the line enters the ellipse is different, and therefore the length
of the undrawn part of the line is wrong.

See the attached picture; the one with the straight line is right, the
one with the curved line is wrong - the blue line should not be drawn
inside the ellipse. Blue = what I am drawing. Yellow = line points.
Green = parts that would be not drawn using the method described above.

I am guessing the maths required to calculate the final length of the
line is horrendously complicated (but please tell me if I am wrong).

Is there maybe another way? Can I say "draw the line, erase the line
within the area of this elliptical 'circle', draw this elliptical
'circle'", in that sequence?

Thanks for any assistance you can provide.

Tarquin
_______________________________________________
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion

Reply via email to