Lighting and Physics in Space

Started by
19 comments, last by DanG 21 years, 11 months ago
I''m sorry, but i simply cannot fallow a word u say.

I understand having the velocity vector, but i don''t get how you say you use a maxumum acceleration vector to define turns. Here is what i think i''m getting out of you explanation:

The plane has a current postion and velocity.
It also has a Maximum_Acceleration number.

When the plane enters a maximum turn, a vector perpendicular to the current direction vector pointing in the turning direction and of length Maximum_Acceleration is added to the current velocity vector. This creates a new direction vector that is the hypotenuse of the triangle formed by the two vectors. If we just keep using this new vector each time for say ten segments of a turn, then it has quickly become much longer than the origonal. In this case the turn is not of uniform radius, the radius increases as we turn. That doesn''t seem right to me.

What i thought up to fix this is to divide the newly created direction vector by the previous one and and then multiply the new vector by this number. This number than becomes the G effect experienced through that segment of the turn, but the turn radiu and speed stay the same.

Does this seem like it works?



He who said money was the root of all evil knew little of the nature of money and less about the nature of man.
Ambassador: Mr. Bush are you stoned or just really, REALLY dumb?Pres. Bush - I assure you I am not stoned.
Advertisement
i gave cheap examples =)

the "g-effect" and the acceleration are always the same. knowing one knows the other. they are just opposites.

whooo someone is thinking. what bout the tilt-a-whirl at the fair. the "g-effect" is pushing me straight out of the round thing up against the cage wall. "if the "g-effect and your acceleration are the same then your saying that im acclererating straight inward?" EXACTLY =)

the tilt-a-whirl is a fine conceptual example. the slower you go the softer you are pushed against the cage right? cause the slower you turn the less acceleration you need to turn in that radius.

if you spin that thing faster the harder you are pushed into the wall cause the more acceleration you need to keep that same radius.

now on to my cheap examples.

the problem with your picture where you say that inward accleration increases the velocity vector over time is where your picturing the resultant vectors.


ok draw a circle. put a dot on that circle. now tangent to the circle extend a vector. thats your velocity. now draw an acceleration vector from the end of the vector tip straight towards the center of the circle...

notice there are no right angles. =)the acceleration will be angled back towards the position dot. even though its aiming straight at the center. thats where you went wrong in your picture. with no right angles there is no implication that there is a hypothenus. in fact with this picture its easy to see that with accleration angled straight at the center its angled slightly against the velocity vector. keeping it the same size.

i didnt give that in my examples cuase its messy. the smallest possible turning radius that keeps velocity the same will always be with acceleration angled slightly against velocity (this is without friction). if velocity increases then acceleration cant turn it as fast. LIKEWISE the smallest possible turn period involves slowing down. acceleration against velocity. you see this in your car when you want to make the right turn going down the road. same will be true in your space sim.



you dont want that. hard to avoid really.







Alright, i''m starting to conceptually see what u are saying. we have our current velocity vector, which is a tangent segment to the turn circle at our location. If we are turning maxed, we have a vector of length MAX_CONST pointing into our circle from the tip of our velocity vector. To calculate our location at the end of of this frame we put the toe of the MAX vector to the head of current velocity vector. The head of the MAX vector is now our current location. Now, if you calculated our old pos to the new in a straight line, then we would be shorter. This is because in theory we went around the perimeter of the circle. Ok its starting to make sense. What i don''t see now is how to calculate the "G effect" of our turn. Where is the vector that represents the force pointing away from the center of the circle over the average of our moved distance?

He who said money was the root of all evil knew little of the nature of money and less about the nature of man.
Ambassador: Mr. Bush are you stoned or just really, REALLY dumb?Pres. Bush - I assure you I am not stoned.
Wait a second, if "G effect" is just a measure of current acceleration, and it can be in any direction, then is the number of G''s linearly related to the length of the MAX_TURN vector + speed acceleratio vector? In this case if the plane can''t turn faster than MAX_TURN and u don''t accelerate through the turn, the G''s are just MAX_TURN mapped in someway to 32 ft per second squared? What about if u are accelerating through the turn (or decelerating for that matter)? In that case, the G''s would still be MAX_TURN because the deceleration is being compensated for in our turn radius, right?
Ambassador: Mr. Bush are you stoned or just really, REALLY dumb?Pres. Bush - I assure you I am not stoned.
gravity is acceleration.

all of this that follows is to make that conceptually clear:
when i let go of something. it falls with acceleration due to gravity.

1g is accelerating at 9.2 meters a second second. so if you know how fast your ship is accelerating you know how much g''s the pilot feels. however notice space numbers are very very large compared to that measly 9.2 meters a second second. changing your velocity by 90 meters per a second say from a 100 meters a second to 190 meters a second in one second is a 10g acceleration. thats why i said in the beginging there is clearly a technology in the story line. theres lots of room for game here.

also note turns. like your car. when you push the gas to much you dont go anywhere: you broke the static friction on your tires. you slow down to fast you break the static friction on your tires cant decelerate as fast. but if you turn you are accelerating so combining any of the above with turning breaks static friction even faster. you see that real life if you try to turn and stop. you only stop faster if your breaks suck. if your breaks are already in full anti-lock mode then turning just causes anti-lock breaks to spend less time actually stopping and more time trying to get static friction back. turning and stopping dont mix well cause they are both forms of acceleration.

the point is now imagine your car doing a constant circle. its accelerating towards center constantly we have established that. but whats going on with the passanger when you do that? hes being pushed up against the door. a fine example of the "g-effect" being acceleration.

so what that means is you take the magnitude of your acceleration divide it by some game technology say divide the acceleration by 15 "effects of dampening field" then divide by 9.2 if its in meters and that tells you how much g force the pilot is feeling. (9.2 because thats the number for acceleration due to one gravity)



oh there might come a conceptual messy question if you ask does that mean i feal gravity because im acceleration?

no. and nobody knows why. its a question as old as newton. no bright eyed science student since newton doesnt think to themselves:
its damn odd that we cant tell the difference between inertia and gravity.

inertia is behind this whole thing btw. objects in motion have a tendency to stay in motion. but in our terms your velocity vector will stay the same if left alone is what thats saying. what that means to turning? well your in your car and your car turns. your velocity vector is still going straight however. and if left alone you will continue to go straight. alas the door on your right arm (for passangers) stops you from going straight. likewise the blood in your head would continue to go straight after the door stop your head from going straight. not to noticable there. but if your talking bout the pushing being 5gs at your feet the blood in your head tends to end up in your legs before your body has stoped it from going straight.

back to my point. to date. meaning with modern physics. if you knock out some scientist. drag them into an elevator car. and tell them "you are either on the surface of the earth or you are accelerating foward in space at 9.8 meters per a second second " there isnt a gravity/inertia/time way to measure that question. to date you cant tell the difference.

for the longest time people held onto the belieft that you might have a gravitational mass AND an inertia mass. mass being the statement of these two effects in a scaler form. mass is defined as a bodies resistance to change in motion. thats the actual def. so the question is why does my body always have the same resistance to changes in motion in gravity as it does to inertia. why should that be?

it just is. that was the classical decision over time. why that is? not sure. dunno. there are exotic theories but nothing concrete.








Hi guys. Well, I haven''t read the whole post/reply (forgive me...). Yet, I try to write a space sim, and forces computing was a problem.
I solve it by changing the whole calculation: my ships are now controlled by forces, each defined by a direction, a point of application and a magnitude. Then I compute force with newtonian formula (for acceleration and rotationnal effect).
To avoid infinite speed (or constant acceleration), as mentionned in a previous reply, I had an "artifact" (it''s like friction, both for linear and rotational speed), to justify friction (call it a Inertial Compensator ). A ship is controled by 12 forces (10 is enough, but I allow the pilote to ride without the compensator in emergency cases, so he needs a braking device like some thrusters on the front side of the ship).
thoses forces are placed around the ship: 8 to control pitch/yaw/roll and 2 to accelerate on the back side of the ship(I say 2, but one can put as many as one wants!). Physics with forces allow a easy implemtation of gravity or directional as well as rotational force fields. Collision shocks are also easy to add.You can also implement some kind of cool malfunction (i.e a thruster offline, the compensator offline, etc...) with realistic responses of the ship.

For the gameplay and story aspect, it allows a complete explaination of space fight conditions:I always found strange to fight in space at a limited speed, in previous game. by the way, this explained why some ship were faster than others...
so you can say it''s impossible to control a fast flying ship, and engineers have designed an internial compensator. The maximum speed is set by the compensator power (or say anything you want, it''s your game!).

I don''t know if it''s a good way to deal with physic in space, but it works very well for my program!

I hope it will help,
Freeman.
regards,Freeman_CIT
Freeman, that seems perfect! For my basic plane i could have a vector straight ahead, one straight back, one up and one down. Since i want to turn by roatating the plane and then pulling straight up, these are all i need (except maybe for small sliding in docking situations). All i have then is just the current velocity vector and these directional vectors. When i want to go faster i add a vector in the same direction as forward and of the length for the speed of acceleration. Friction force is determined by the length of the current velocity and is added in the backward direction. I''m still not sure about how to do the tuirning

He who said money was the root of all evil knew little of the nature of money and less about the nature of man.
Ambassador: Mr. Bush are you stoned or just really, REALLY dumb?Pres. Bush - I assure you I am not stoned.
1 g is 9.8 meters per second per second

there''s a suit either in service soon or still being tested that will allow pilots to go up to 10 g''s, and what''s not being done but could be is making the cockpit able to move slightly independent of the ship, kind of like why they put barrels of sand in front of big, hard structures on the roads
http://www.jsc.nasa.gov/er/seh/math55.html

This topic is closed to new replies.

Advertisement