CAW - computer aided weaving simulator for IRISes

Robert Bernecky rbe at yrloc.ipsa.reuter.COM
Sun Feb 10 11:44:35 AEST 1991


Wow. That's quite an impressive bunch of code you got there.
In APL (See "APL: A Prototyping Language" by yrs trly in ACM SIGAPL
Quote Quad Vol 16 No 4), we'd do it this way for a simple weave.

wv gets ' *'[tieup[tread;] or.=thread]

Where "or" is a logical or symbol which doesn't print here.
Ditto for "gets", which is a left arrow, denoting assignment.

If you want to make a quilt of several rectangles of cloth formed
from the above function, do (In SHARP APL -- IBM apl2 is a bit
different):

4 5 reshape < wv

Where reshape is rho -- the reshape function, to give a 4 by 5 matrix
of pieces. Of course, you can combine several rectangles to get a real
quilt...

tread and thread are integer vectors, 0-origin. tieup is a matrix
also 0-origin.

I'll try this in J, and supply similar expressions in J, for your 
edification. (J is a modern dialect of APL, which has discarded a lot
of the old baggage of APL, such as the funny character set -- J uses
vanilla ASCII). 

Bob Bernecky
Snake Island Research Inc.



More information about the Comp.sys.sgi mailing list