Re: [NTG-context] metafun question getting XY

2004-08-16 Thread Hans Hagen
Floris van Manen wrote:
if i define a path
q := (w0,w0)--(w0,ww0)--(w2,ww1)--(w3,ww2)--(w3,w0)--cycle ;
and then pass this path as a parameter to a function
test( q ) ;
then within that function i can step through the 'list of points'.
def test( expr a  ) =
for i = 1 upto (length(a)-2):
 dotlabel.bot ( , (point i of a)  );
endfor ;
enddef;
but how could i extract from each point the X and the Y value to
construct the lines like this.
for i = 1 upto (length(a)-2):
 z1 = (point i of a) ;
 draw (0,y1)--(100,y1) ;
endfor;
 

xpart point i of a ; 
ypart point i of a ; 

Hans 

-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun question

2004-08-16 Thread Hans Hagen
Floris van Manen wrote:
it seems that metafun has difficulty understanding the example using
 

no, it's tex playing tricks (# is kin dof special to tex)
thevardef [EMAIL PROTECTED] expr p =   construct.
 

use \# instead
Hans
-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context