I have a floating point array p
representing a 3 dimensional stack
of shaped bricks projected onto
(possibly warped) film. Each brick
has 6 faces. I wish to use a
polyline of 8 points to display
each face. The faces of a brick
should be the same color.
$p
2 3 5 6 8 2
Rank 1 items are x y film coordinates.
A rank 2 item forms a polyline.
Rank 3 items are monochrome.
Color isn't particularly important, as
long as it differs from the background.
If color varies, best if it changes in
the 3 dimensional frame.
What please is a suitable way to display this?
Sample data for a 1x2x1 stack:
q=:0 :0
_0.55 _0.55 _0.55 0 0.55 0 0.55 _0.55
_0.55 _0.27 0 0 0.55 _0.27 0 _0.55 _0.67
_0.67 0.67 _0.67 0.67 0 _0.67 0 0 _0.67
0.67 _0.33 0 0 _0.67 _0.33 _0.55 _0.55
0.55 _0.55 0.67 _0.67 _0.67 _0.67 0 _0.55
0.6 _0.6 0 _0.67 _0.6 _0.6 _0.55 0 _0.67
0 0.67 0 0.55 0 _0.6 0 0 0 0.6 0 0 0
_0.55 _0.55 _0.67 _0.67 _0.67 0 _0.55
0 _0.6 _0.6 _0.67 _0.33 _0.6 0 _0.55
_0.27 0.55 _0.55 0.55 0 0.67 0 0.67 _0.67
0.55 _0.27 0.6 0 0.67 _0.33 0.6 _0.6
_0.55 0 _0.55 0.55 0.55 0.55 0.55 0 _0.55
0.27 0 0.55 0.55 0.27 0 0 _0.67 0 0.67 0
0.67 0.67 _0.67 0.67 0 0 0.67 0.33 0 0.67
_0.67 0.33 _0.55 0 0.55 0 0.67 0 _0.67 0
0 0 0.6 0 0 0 _0.6 0 _0.55 0.55 _0.67
0.67 0.67 0.67 0.55 0.55 _0.6 0.6 0 0.67
0.6 0.6 0 0.55 _0.55 0 _0.67 0 _0.67 0.67
_0.55 0.55 _0.6 0 _0.67 0.33 _0.6 0.6
_0.55 0.27 0.55 0 0.55 0.55 0.67 0.67
0.67 0 0.55 0.27 0.6 0.6 0.67 0.33 0.6 0
)
p =: 1 2 1 6 8 2$".' '((q=10{a.)#i.#q)}q
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm