2010/4/10 Kip Murray <[email protected]>:
> Would you, Raul, and Oleg be willing to describe what your own "faces" 
> programs
> are doing -- how they accomplish their results?

points=: [: >@,@{ [: <"1@|: +/\

Given a located vector representation of an oriented
box, this gets the coordinates of all the corners of that
box.

faces=: ] -~/\@,:"1 [ #~ 1 = ] +/@:="1 [

Given all corners of a box (left argument) and a
single corner of that box (right argument) this gets
located vectors for faces that share these corners.

boxr=: ((faces {.), (faces {:))@points

This uses the above two routines to get all the
faces bordering the two corners specified by the
original located vector.

FYI,

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to