Non-instantaneous model of applied force?

Click For Summary
The discussion centers on modeling applied force in physics simulations using keyboard input, specifically addressing the challenge of instantaneous force application. The user proposes two potential solutions: sinusoidal targeting of velocity and damping force, with a preference for the latter due to its simplicity and efficiency. They seek feedback on implementing a gradual force increase, akin to how physical forces are applied in real life. A suggestion is made to create a linear force increase over time to achieve smoother transitions. The conversation emphasizes the importance of realistic force modeling in programming.
Aaorris
Messages
2
Reaction score
0
Hey everyone! I'm a recent high school graduate, and I've been trying to model some simple physics with computer code. What's on my mind right now is modeling applied force using keyboard input. The computer knows if a key is down, or not. Applying force based on that input would mean that your applied force is instantaneous! To remedy this, I imagine 2 solutions:
  1. Sin targeting of velocity
  2. Damping force
modeled below is an idea for sin targeting, but damping seems a more usual, less computer intensive method... I just have to think about modeling damping force more...

[thinking out loud]
for damping, F = -cV ?
delta_a = -cV
maybe I've just been thinking too hard. What do you guys think?
[PLAIN]http://popoa.webs.com/appliedForce.jpg
 
Last edited by a moderator:
Physics news on Phys.org
I can't see your picture from here at work, so I have to ask that you be a little more specific with what you are asking. Are you asking how to program a "ramp up" time where the force gradually increases in your program after you press the key? I'm not a programmer at all so I apologize if my terminology isn't correct.
 
Yes, imagine yourself pushing on a wall - you cannot instantly apply all of your force at once, and you also cannot pull away instantly. I just wanted insight into how to model that.

I believe I'll just half-skip this situation by having a linear force increase over a certain amount of time, until the force desired is reached to create smooth force transitions
 
I do not have a good working knowledge of physics yet. I tried to piece this together but after researching this, I couldn’t figure out the correct laws of physics to combine to develop a formula to answer this question. Ex. 1 - A moving object impacts a static object at a constant velocity. Ex. 2 - A moving object impacts a static object at the same velocity but is accelerating at the moment of impact. Assuming the mass of the objects is the same and the velocity at the moment of impact...

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 36 ·
2
Replies
36
Views
4K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 13 ·
Replies
13
Views
791
  • · Replies 2 ·
Replies
2
Views
799
  • · Replies 1 ·
Replies
1
Views
2K