![]() |
Re: OT - math question.
Quote:
there is no particular reason why the center of the sphere has to be the 0 point - he wanted the answer from the bottom of the sphere after all likewise there is no particular reason why z has to be up, y back, and x right - reducing to circle makes y up using cartesian so it works as height Quote:
also, narf specified direction of travel - to the right - which pretty much forces a circle sgement anyway |
Re: OT - math question.
x is left/right, y is up/down, z is not used.
it's a random straight line x movement and i need the y position on the sphere that a line straight up would hit. sorry for not being clear the first time. i guess i need to reread mathamatical Posts at least three times. |
Re: OT - math question.
Quote:
need: r: radius of sphere d: distance traveled want: h: height above bottom edge of sphere edit: small mistake on co-ordinate system - fixed h = r - sqrt(r - d^2) notes: not defined for |d| > r above applies for lower edge upper edge is h = r + sqrt(r - d^2) [ February 19, 2004, 08:08: Message edited by: Member 4148 ] |
Re: OT - math question.
and if your wondering what you worked so hard on http://forum.shrapnelgames.com/images/icons/icon10.gif , think big bowling ball. no, bigger than that. http://forum.shrapnelgames.com/images/icons/icon10.gif
thanks, guys. 'coincedently', there's a new hazard in my game. http://forum.shrapnelgames.com/images/icons/icon10.gif |
Re: OT - math question.
Attack of the killer bowling balls...
Run for your lives!!! ....aaaarrrrrrrrrggggh....splat ! http://forum.shrapnelgames.com/images/icons/icon10.gif Incidentally, if the distance traveled is very small compared to the size of the ball, then you can probably make do with an approximation. In that case, the pythagorean theorum or the tangent function will probably do the trick. |
Re: OT - math question.
Quote:
there is no particular reason why the center of the sphere has to be the 0 point - he wanted the answer from the bottom of the sphere after all likewise there is no particular reason why z has to be up, y back, and x right - reducing to circle makes y up using cartesian so it works as height </font><hr /></blockquote><font size="2" face="sans-serif, arial, verdana">No, it doesn't have to be, but it does certainly help if you either stick to a standard coordinate system or define the one you are working in. http://forum.shrapnelgames.com/images/icons/icon7.gif |
Re: OT - math question.
it's not the distance traveled - they're so big they flatten things. http://forum.shrapnelgames.com/images/icons/icon10.gif
|
All times are GMT -4. The time now is 02:18 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.