Brian Schott wrote:
> +  eye=: -4 8 12 {,y
>
>       I think this should be eye=: -3 7 11{,y

Oops, I made a huge mistake there.  Actually,
it should be
   eye=: -3 7 11{,y %. y*-.(i.4 4)e.3 7 11

> +  scale=:+/&.:*: eye
> +  's up nf'=: 3 3 {.y
>
>       What do s and nf stand for here? I think it does
> make sense to use the middle vector in 3 3{.y for up.

nf is -f (negative of f from lookAt).

s and f were originally from the documentation on gluLookAt:
http://opengl.org/documentation/specs/man_pages/hardcopy/GL/html/glu/loo
kat.html

I'd guess that f stands for "focal point" and s stands for
"side point" or maybe "sinister point" (using the heraldic
definition for sinister).

Basically, <s, u, f> are the x, y and z axes generated by gluLookAt,
except the underlying math results in a left handed coordinate system,
so f is negated to make it a right handed coordinate system.

>       I cannot understand why you are checking this match?
> Is the double application of tAkool lookAt necessary to
> first create the valid input and then to test the input?
> Such a strategy seems like forcing a match.

It's not a good test, as the error I made (first quoted
line) indicates.  

That said, the underlying issue is that eye/center/up do
not have to be orthogonal, and the procedure I defined, above
expects an orthogonal result (more specifically: 3x3 orthogonal
with the fourth axis used to translate the 3x3 point of origin).

So, tAkool lookAt ?9#0 is intended to generate an initial
"orthogonal" argument (also scaled the same way as would
the result generated by tAkool).

Anyways, feel free to use your own tests.

Just make sure to fix the calculation for eye in tAkool.

Thanks,

-- 
Raul

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

Reply via email to