Alice Community  

Go Back   Alice Community > General Discussion > Questions and Comments

Reply
 
Thread Tools Display Modes
How do these functions work?
Old
Rick Prins
Guest
 
Status:
Posts: n/a
Default How do these functions work? - 03-13-2008, 09:47 PM

Object function "Object's Quaternion" returns 4 coordinates (w,x,y,z).
Can someone please explain to me what those coordinates represent?

Also, a world function under the "other" category has 3 parameters, right, up and forward. How do those work?
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 03-14-2008, 12:14 AM

Quote:
Originally Posted by Rick Prins View Post
Object function "Object's Quaternion" returns 4 coordinates (w,x,y,z).
Can someone please explain to me what those coordinates represent?

Also, a world function under the "other" category has 3 parameters, right, up and forward. How do those work?
Can't help you much with Quaternion. I do know that they are heavily used by game programmers. I believe that they somehow combine coordinate information with orientation information. Apparently they provide computational efficiencies for certain operations. Even if you get a Quaternion in Alice, I don't believe there is much support for doing anything with it.

However, right, up, and forward are simply Alice-speak for the normal X, Y, and Z coordinates of a 3D world. Apparently the Alice development team believed that right, up, and forward would be somewhat less mentally challenging than X, Y, and Z for beginning programming students.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 03-15-2008, 10:59 AM

For more on quaternions see the thread:
http://www.alice.org/community/showt...highlight=roll

As I understand it, they simplify the matrix manipulations required to do 3D math, especially if it is heavy in rotations, thus the popularity with game programmers. Doubt if a non-specialist would have much use for them - just a good basic matirx manipulation package should be adequate.

They are part of the CMU math pack - but, as Dick noted - I don't think there is any way to directly access that from the current version of Alice.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2021, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.