.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old February 19th, 2004, 08:11 AM
narf poit chez BOOM's Avatar

narf poit chez BOOM narf poit chez BOOM is offline
Shrapnel Fanatic
 
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
narf poit chez BOOM is on a distinguished road
Default OT - math question.

say you had a point at the bottom of a sphere and then moved it to the right a random distance along the surface of the sphere. how would you calculate the height from the bottom?

[ February 19, 2004, 06:11: Message edited by: narf poit chez BOOM ]
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
Reply With Quote
  #2  
Old February 19th, 2004, 08:21 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: OT - math question.

Calculate the degrees away from the pure vertical radius that the new radial line connecting to the new point on both the x and y planes. Then use some arc length calculations.
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #3  
Old February 19th, 2004, 08:23 AM
narf poit chez BOOM's Avatar

narf poit chez BOOM narf poit chez BOOM is offline
Shrapnel Fanatic
 
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
narf poit chez BOOM is on a distinguished road
Default Re: OT - math question.

that's the problem. i know neither the y position nor the arc calculations.
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
Reply With Quote
  #4  
Old February 19th, 2004, 08:44 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: OT - math question.

Umm... if you are moving it in a random direction, should you not be able to see where it is moving to?

Either way, measure the vector between the start point and the end point. You can get the angles from this vector with pythagorian theorm used a few times. If you have coordinates, no measurement is required, just calculations.
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #5  
Old February 19th, 2004, 08:51 AM

Member 4148 Member 4148 is offline
Private
 
Join Date: Jun 2003
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Member 4148 is on a distinguished road
Default Re: OT - math question.

Quote:
Originally posted by narf poit chez BOOM:
say you had a point at the bottom of a sphere and then moved it to the right a random distance along the surface of the sphere. how would you calculate the height from the bottom?
if it is traveling in a straight line, it might as well be on the edge of a circle, as you are starting from the ultimate "south" position (nowhere to go but north)

you need your distance traveled - call that d
you need the radius of the sphere - call that r

now, set your graphin calculater into radian mode
then tell it to do the following equation

height from bottom = (sin((d/r) - pi/2) * r) + r

there are lots o variation on this equation

drop the +r to get the height above (+) or below (-) th center
__________________
<img src=http://www.danasoft.com/sig/ alt= - /]
Reply With Quote
  #6  
Old February 19th, 2004, 08:53 AM

Member 4148 Member 4148 is offline
Private
 
Join Date: Jun 2003
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Member 4148 is on a distinguished road
Default Re: OT - math question.

Quote:
Originally posted by Imperator Fyron:
Umm... if you are moving it in a random direction, should you not be able to see where it is moving to?

Either way, measure the vector between the start point and the end point. You can get the angles from this vector with pythagorian theorm used a few times. If you have coordinates, no measurement is required, just calculations.
i think he is looking for y position - he has starting point, path traveled (along surface of sphere), distance traveled, wants ending point
__________________
<img src=http://www.danasoft.com/sig/ alt= - /]
Reply With Quote
  #7  
Old February 19th, 2004, 09:00 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: OT - math question.

y position is not height. Not sure what I was thinking with arc length, but you definitely need the angles associated with the vector from the starting point to the ending point. The relative height is just the z component of that vector.

Treating the movement as along a circle only works if the only component that is changing is the z component. If x or y change (but not both), then it is no longer a circle, but an ellipse.
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #8  
Old February 19th, 2004, 09:01 AM
narf poit chez BOOM's Avatar

narf poit chez BOOM narf poit chez BOOM is offline
Shrapnel Fanatic
 
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
narf poit chez BOOM is on a distinguished road
Default Re: OT - math question.

yes, thank you, will try the calculation.
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
Reply With Quote
  #9  
Old February 19th, 2004, 09:04 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: OT - math question.

Actually... if you have the arc length, that gives you the angles you need to calculate the height, as you can calculate the percent of the 360 degress of the circle that that arc takes up using the 2 * pi * radius calculation for circumference.
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #10  
Old February 19th, 2004, 09:12 AM
narf poit chez BOOM's Avatar

narf poit chez BOOM narf poit chez BOOM is offline
Shrapnel Fanatic
 
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
narf poit chez BOOM is on a distinguished road
Default Re: OT - math question.

no, that part wasn't stated well. i don't have the arc length, only the x distance moved.
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
Reply With Quote
Reply

Bookmarks


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 On

Forum Jump


All times are GMT -4. The time now is 02:45 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.