Polar Coordinate System?

Post » Tue Jun 19, 2012 9:26 pm

I saw that there is the ability to go from radians to degrees and back with papyrus? This seems utterly useless if there is no polar coordinate system.... or is there one that I am having trouble digging up?
User avatar
Kieren Thomson
 
Posts: 3454
Joined: Sat Jul 21, 2007 3:28 am

Post » Tue Jun 19, 2012 4:21 pm

The game is NOTHING BUT a Polar Coordinate System... how are you not understanding the very basics of get/setpos, get/setangle and the world coordinate system based on cells starting at position 0,0,0 and moving out in all directions from there.

Then EVERY actor and objects position exists as its own polar coordinate system with its current position in the world as its pole.
User avatar
BEl J
 
Posts: 3397
Joined: Tue Feb 13, 2007 8:12 am

Post » Wed Jun 20, 2012 5:20 am

It uses a cartesian coordinate system not a polar one. It has functions for radians and degrees because they can be used in math to calculate position and angle of things as well as other such things people might wish to use for their mods.
http://en.wikipedia.org/wiki/Trigonometry
User avatar
Sabrina Steige
 
Posts: 3396
Joined: Mon Aug 20, 2007 9:51 pm

Post » Wed Jun 20, 2012 12:44 am

I still want a way to rotate an object along it's local axis...how the heck can you make something track an object that is above or below it if you can't tilt it up or down without the item doing a wacky weave due to the sequential Z>Y>X rotation the game uses?!
User avatar
x_JeNnY_x
 
Posts: 3493
Joined: Wed Jul 05, 2006 3:52 pm

Post » Tue Jun 19, 2012 3:59 pm

While I agree X that trig functions could be extremely useful in modding, how does converting from radians to degrees or vice versa help with that?
User avatar
Marnesia Steele
 
Posts: 3398
Joined: Thu Aug 09, 2007 10:11 pm

Post » Tue Jun 19, 2012 4:31 pm

well, the sin cos and tan functions take degrees as a parameter, what if you had an angle in radians?
User avatar
Harry Leon
 
Posts: 3381
Joined: Tue Jun 12, 2007 3:53 am

Post » Tue Jun 19, 2012 9:27 pm

Convert it to degrees?
float Degrees = Radians * 180 / 3.1415926535897932384626433832795
User avatar
Chloe Botham
 
Posts: 3537
Joined: Wed Aug 30, 2006 12:11 am

Post » Tue Jun 19, 2012 6:31 pm

None of the functions in papyrus get angles in radians... they get them in degrees and can be converted. If you were modding and you wanted a specific angle in radians you could do the conversion yourself and just use degrees for papyrus. Radians could be very useful in a polar coordinate system. I guess it doesn't matter really since there isn't one.
User avatar
Haley Merkley
 
Posts: 3356
Joined: Sat Jan 13, 2007 12:53 pm

Post » Wed Jun 20, 2012 6:16 am

I still want a way to rotate an object along it's local axis...how the heck can you make something track an object that is above or below it if you can't tilt it up or down without the item doing a wacky weave due to the sequential Z>Y>X rotation the game uses?!

I did this in Oblivion using the Algohol OBSE plugin, it implemented quaternion converting. I'm not great at math though, I wouldn't know how to do it in Skyrim without such quaternion functions.
User avatar
Sarah Edmunds
 
Posts: 3461
Joined: Sat Jul 08, 2006 8:03 pm

Post » Tue Jun 19, 2012 6:29 pm

Could u fake a polr coordinate system that would solve both these issues like this'ish:
This is ofcourse incomplete:

You would getangle player. A series of ifs and elseifs would sort out how far your angle is from a 90, 180, 270, or 360 and then use the appropriate sin/cos to reference the position of an object if you wanted to move an object a certain distance from the player. That distance would be the hypotenuse.
You would also need a series of ifs and elseifs to sort out negative vs positive coords.. you would absolute value these negative coorrds for the trig functions. Then you would have to keep track of what's negative so it could switch them back after your position is figured out.

Brake is over maybe ill add more to this tonight.
User avatar
Enie van Bied
 
Posts: 3350
Joined: Sun Apr 22, 2007 11:47 pm

Post » Wed Jun 20, 2012 12:59 am

Convert it to degrees?
float Degrees = Radians * 180 / 3.1415926535897932384626433832795
Or simply use the built in function for it? Which is easier?
User avatar
saharen beauty
 
Posts: 3456
Joined: Wed Nov 22, 2006 12:54 am


Return to V - Skyrim