Raul, Oleg, and Andrew

It now appears I will have to take your solutions with me on a weekend trip to 
Ann Arbor, I still have not had a chance to examine them in detail.

I would like for you to subject your solutions to one more test: try them on 
the 
box with diagonal 4 3 0 ,: _4 _3 _2 .  This moves the previous example
0 0 0 ,: 4 3 2 down two units, so the top face of the new example is in the xy 
plane, and the bottom face is two units below the xy plane.  Do your verbs give 
correct results for this new example?

Kip


Andrew Nikitin wrote:
>  
> cubes=:0,:"1 ] _1^#:i.8
>  
> NB. box is represented with origin and diagonal vector
>  
> NB. canonic representation is one with diagonal vector having all
> NB. nonnegative components
> cr=:(<./ ,:>./)&.(+/\)
>  
> NB. list faces
> faces=:[: ,/ ((({:@[ * -...@]) ,:"1~ {...@[ ,: {...@[ + {:@[ * ])"2 1 
> =...@i.@{:@$) 
> 
> I just wanted to show off my version of cr, which uses my favorite &.(+/\)
>  
> faces verb is not different from what others have already posted and included 
> only since original poster specifically asked for it.
>  
>                                         
> _________________________________________________________________
> The New Busy is not the old busy. Search, chat and e-mail from your inbox.
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to