Quadrays and XYZby Kirby Urner |
|
|
|
|
|
Since this primitive tetrahedron is formed by the centers of
four closest packed unit-radius spheres, we have six edges of length 2. |
![]() |
|
|
|
![]() |
The xyz-oriented green edges each protrude through respective cube face centers to opposite corners of a rhombus, the same one depicted above, with a short diagonal of root(2) and a long diagonal of 2. These edges and the edges of the cube-inscribed quadray tetrahedron bisect one another, at a distance root(2)/2 from the origin. |
|
|
![]() |
|
|
|
![]() |
|
|
|
![]() |
|
As an alternative to these matrix expressions, we can provide the same computations in a more procedural form, using computer language conventions, matrices being nothing more than fancy typography for indexed 2-dimensional arrays after all. For converting quadrays to xyz, we might write something like:
procedure quad2xyz(a,b,c,d)
x = 1/root2 * (a - b - c + d)
y = 1/root2 * (a - b + c - d)
z = 1/root2 * (a + b - c - d)
endproc
Going the other direction, and depending on the specific computer
language used, our code would probably look something like:
procedure xyz2quad(x,y,z)
q(1) = 1/root2 * (iif(x>=0,x, 0)+iif(y>=0,y, 0)+iif(z>=0,z, 0))
q(2) = 1/root2 * (iif(x>=0,0,-x)+iif(y>=0,0,-y)+iif(z>=0,z, 0))
q(3) = 1/root2 * (iif(x>=0,0,-x)+iif(y>=0,y, 0)+iif(z>=0,0,-z))
q(4) = 1/root2 * (iif(x>=0,x, 0)+iif(y>=0,0,-y)+iif(z>=0,0,-z))
simplify( )
endproc
procedure simplify
local i
minval=q(1)
for i=1 to 4
minval = min(minval,q(i))
endfor
for i=1 to 4
q(i)=q(i)-minval
endfor
endproc
Note that we invoked a simplification routine at the end of the
above conversion, along the lines of the previously outlined
matrix-notated version. Note also that the code would look entirely
different (and much more compact) if written in Kenneth
Iverson's APL (A Programming Language). |
|
|
Graphics developed from original artwork in
Synergetics |