Xref: utzoo comp.graphics:15893 comp.sys.sgi:8197 Path: utzoo!mnetor!tmsoft!itcyyz!yrloc!rbe From: rbe@yrloc.ipsa.reuter.COM (Robert Bernecky) Newsgroups: comp.graphics,comp.sys.sgi,sgi.general,sgi.engr.all Subject: Re: CAW - computer aided weaving simulator for IRISes Message-ID: <1991Feb10.004435.7088@yrloc.ipsa.reuter.COM> Date: 10 Feb 91 00:44:35 GMT References: <84481@sgi.sgi.com> Reply-To: rbe@yrloc.ipsa.reuter.COM (Robert Bernecky) Organization: I P Sharp Associates, Toronto Lines: 30 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.