[metapost] Redefine ..
Boguslaw Jackowski
B_Jackowski at GUST.org.pl
Tue Jun 5 14:25:51 CEST 2012
Hi,
HH> however, the next challenge is to catch a 'cycle'.
TH> Indeed Hans. Any thoughts on tackling that?
[...]
HH> Probably best is to have a new symbol
[...]
HH> draw (1,1,9) .!. (2,1,6) .!. (3,2,5) .!. (4,1,5) .!. threeDcycle ;
Pretty neat. :)
Still, there remains a little bit more difficult challenge:
to allow tensions in path expressions. And curly braces...
I believe that the redefining of the "horizontal colon" is
a road to nowhere. The MF/MP lingo is too weak. It does
not allow for introducing "private" structures which
would provide a real solution.
First of all, tuples are limited to 2-tuple
(pair), 3-tuple (RGB color), 4-tuple (CMYK color),
and 6-tuple (transform), coordinates of each accessed
differently.
You are not allowed to define your own tuple -- indexed
variables cannot be used equivalently as a components
of expressions.
And paths are one level above tuples.
What one would actually need is to define a structure
corresponding to 3D path and project it into 2D space.
This is clearly impossible if one wants to preserve
the "syntactic sugar" of MF/MP.
All in all, I'd vote for Troy's first attempt:
to define 3D --> 2D function and apply it to every node.
Good luck -- cheers -- Jacko
Cheers -- Jacko
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Bogus\l{}aw Jackowski: B_Jackowski at GUST.ORG.PL
----------------------------------------------------------------
Hofstadter's Law: It always takes longer than you expect, even
when you take into account Hofstadter's Law.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
More information about the metapost
mailing list