.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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 

Bookmarks

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 On

Forum Jump


All times are GMT -4. The time now is 02:55 PM.


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