Have a better lookat() ?
DanKarron at UCBVAX.BERKELEY.EDU
DanKarron at UCBVAX.BERKELEY.EDU
Sun Mar 24 06:36:44 AEST 1991
Has anyone have an algoritm for removing the annoying twist when you
use lookat() to view an object from arbitrary locations ?
I need the formulas given two points that define an eye vector will
return the euler angles (Z,Y,X is my preferred order) that will
(when inverted) give a view of an object with the world space +Z vector
always pointing up (+y in screen space) as much as possible. I am hard coding
values for the 24 cardinal points of a cube surrounding an object for
eye positions looking at the origin, and there must be a formula to calculate
the roll (Z euler angle) to keep the object right side up.
Cheers! (I will post the values that look good, but what is the formula
for arbitrary locations ?)
| karron at nyu.edu (e-mail alias ) Dan Karron, Research Associate |
| Phone: 212 263 5210 Fax: 212 263 7190 New York University Medical Center |
| 560 First Avenue Digital Pager <1> (212) 397 9330 |
| New York, New York 10016 <2> 10896 <3> <your-number-here> |
More information about the Comp.sys.sgi
mailing list