Raul,

        I think you have given the transformation from B to
A, but I need A to B. That is, if M and v are inputs to the
function, I need outputs eye, center, up, if that is
possible.

        To get the result I think you are producing I have
used the following code.

glaGetFloat_jzopenglutil_ =: 3 : 'r[glGetFloatv  y;r =. 16#0.1'
glaGetFloat GL_MODELVIEW_MATRIX


On Thu, 14 Dec 2006, Miller, Raul D wrote:

+ According to the first page I found documenting gluLookAt,
+ the following "lookAt" verb should do the same thing:
+
+ normalize=: ] % +/&.:*:
+ X=: (1&|[EMAIL PROTECTED] * _1&|[EMAIL PROTECTED]) - _1&|[EMAIL PROTECTED] * 
1&|[EMAIL PROTECTED]
+
+ lookAt=:3 :0
+  y+9#0
+  'eye center up'=. 3 3$y
+  f=.normalize center-eye
+  s=.f X normalize up
+  u=.s X f
+  M=.s,u,(-f),:_4{.1
+  glMultMatrix M
+  glTranslated -eye
+ )
+
+ However, I have not tested this.
+
+ --
+ Raul
+

(B=) <----------my "sig"

Brian Schott
Atlanta, GA, USA
schott DOT bee are eye eh en AT gee em ae eye el DOT com
http://schott.selfip.net/~brian/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to