Jump to content

Physics engine for proof of concept


DandelionTheory

Recommended Posts

46 minutes ago, DandelionTheory said:

if you have 3 masses A, B & C

A & C are rigidly attached to each other

B Pivots around C via a rigid bearing.

If a force on any of these masses is to be represented correctly, opposite forces need to be shown for every force applied.

so if mass A acts on Mass B(represented by F1 and F2), the work done on mass B will be done oppositely to Mass C (F3)correct? see picture below.

 3masses.png.992c26f1a9f0a929a01c5dee7d6a376b.png

I think you're misapplying "opposite".

The opposite and equal force in Newtonian physics is about the reaction on whatever's applying a force.

That is, how is force F1 applied?

e.g. if it's an electromagnet pulling on A (say it's a metal ball), then there will be a force opposite to F1 on that electromagnet.

F2 is nothing to do with that.

In the end, this is why your magic machine won't do what you think it does. In a self-contained machine (i.e. not throwing away mass like a rocket does), the forces must cancel out.

(Looking at your diagram, anyway, ignoring how F1 is applied, object A would be pulling on C via the connection. F1 is probably off-centre of mass, so there'd be a torque to the overall A-C system (it'll try to rotate) - so there won't be an F3 parallel to F1. The A-C system acts on B via another connecting rod, so that force would be in the direction (more or less) of B to C, not F2. Of course there's another rotation, and that connection isn't fixed; so it all gets complicated.)

Edited by pzkpfw
Link to comment
Share on other sites

23 minutes ago, DandelionTheory said:

may i ask if this partains to the slight thousandths of a unit distance the 3 weight system seem to do?

Physics simulation engines split time to slices ("frames") e.g. 1/1000 of second. Every frame there are recalculated positions, velocities, accelerations, forces etc. Small imprecisions of floating point math adds up together. You can start with literally single object at 0,0,0 with velocity 1,0,0 and after a few seconds notice that object is not exactly at positions 1... 2... 3... 50... 1000.. as you would expect but e.g. 999.999x etc. etc.

Edited by Sensei
Link to comment
Share on other sites

8 minutes ago, Sensei said:

Physics simulation engines split time to slices ("frames") e.g. 1/1000 of second. Every frame there are recalculated positions, velocities, accelerations, forces. Small imprecisions of floating point math adds up together. You can start with object at 0,0,0 with velocity 1,0,0 and after a few seconds see that object is not exactly at positions 1... 2... 3... 50... 1000.. as you would expect but e.g. 999.999x etc. etc.

got you, so if i calculate over time i would need to account for this.

i attempted to use variables in order of magnitude to help with this problem, also i add force at certain times due to the units being in newtons/kg

Edited by DandelionTheory
Link to comment
Share on other sites

17 minutes ago, DandelionTheory said:

F1 is done to mass A by mass B, F2 is the opposite reaction mass B feels, F3 is the opposite to F2 due to mass B & C being connected.

That's not at all what you first described.

And still doesn't make sense. You are not using "opposite" correctly.

Link to comment
Share on other sites

56 minutes ago, pzkpfw said:

That's not at all what you first described.

And still doesn't make sense. You are not using "opposite" correctly.

How do I do it?

If you take out mass A entirely it's opposite still, if you take mass C out instead it's opposite.

Edited by DandelionTheory
Link to comment
Share on other sites

14 minutes ago, DandelionTheory said:

How do I do it?

If you take out mass A entirely it's opposite still, if you take mass C out instead it's opposite.

Try starting with a simpler case. Just two masses, in line, with string. You're pulling on one mass. Think about the forces on each other.

Hand pulling to the left ---- (A) ---- (B)

Which directions are the forces:

From hand to (A) (and (B)), from (A) (and (B)) to hand?

From (A) to (B), and (B) to (A)?

Edited by pzkpfw
Link to comment
Share on other sites

12 hours ago, pzkpfw said:

Try starting with a simpler case. Just two masses, in line, with string. You're pulling on one mass. Think about the forces on each other.

Hand pulling to the left ---- (A) ---- (B)

Which directions are the forces:

From hand to (A) (and (B)), from (A) (and (B)) to hand?

From (A) to (B), and (B) to (A)?

Can we agree my example has nothing inline masses?

Right angles buddy

Also read the part about rigid connection mentioned, seems you think C would "move closer" to A regardless of the rigid body between them. 

Am I correct to assume you forgot it wasn't a rope?

Edited by DandelionTheory
Link to comment
Share on other sites

Dandelion... start with answering pzkpfw's simple case, that way you show you understand what people are trying to tell you regarding forces. Yes it has nothing directly to do with your example, but the principles remain similar... Most people here are trying to help you, but then you are saying that they don't understand what you are trying to do (which is fair, because you leave out a lot of information, but in this case, pzkpfw is just trying to help you out with some basic physics). 

We are 5 pages in, and I have yet to understand what exactly the point of this is, you are not trying to model reality, and you cannot invent new physics from things in an engine. But that isn't as important as just answering some basics physics questions, from the simpler case you can then apply those rules and logic to a more complex (your) example.

Link to comment
Share on other sites

1 hour ago, Dagl1 said:

Dandelion... start with answering pzkpfw's simple case, that way you show you understand what people are trying to tell you regarding forces. Yes it has nothing directly to do with your example, but the principles remain similar... Most people here are trying to help you, but then you are saying that they don't understand what you are trying to do (which is fair, because you leave out a lot of information, but in this case, pzkpfw is just trying to help you out with some basic physics). 

We are 5 pages in, and I have yet to understand what exactly the point of this is, you are not trying to model reality, and you cannot invent new physics from things in an engine. But that isn't as important as just answering some basics physics questions, from the simpler case you can then apply those rules and logic to a more complex (your) example.

Condescension does not promote confidence.

pretend i know the basics about inline masses.

 

Edited by DandelionTheory
Link to comment
Share on other sites

3 hours ago, DandelionTheory said:

Condescension does not promote confidence.

pretend i know the basics about inline masses.

 

Pretend isn't applicable. I never assume anyone understands basic physics until they show otherwise.

 

Link to comment
Share on other sites

21 hours ago, DandelionTheory said:

if you have 3 masses A, B & C

A & C are rigidly attached to each other

B Pivots around C via a rigid bearing.

If a force on any of these masses is to be represented correctly, opposite forces need to be shown for every force applied.

so if mass A acts on Mass B(represented by F1 and F2), the work done on mass B will be done oppositely to Mass C (F3)correct? see picture below.

 3masses.png.992c26f1a9f0a929a01c5dee7d6a376b.png

It depends on what you want to model. In Unity3d you could script for instance F1 only and let the engine calculate the internal forces between objects and rods that would follow. That lets  the engine model how the objects A,B,C will move. Or you could script F1, F2 and F3 (or any combo if you wish) and let the engine calculate the resulting movement. 

 

Here is an analogy that applies to the assembly above trying to explain the difference. We assume zero gravity. Let's say you have an arm for a humanoid object such as a marionette . "A" is the shoulder, "C" is the elbow and "B" is a hand. Unity3d lets you apply a force to for instance the shoulder "A". F1 would be like rising the marionette's shoulder up/right with a string. Next you decide what you want to model; a rod or string in control of each joint or a loose, hanging "rag doll arm". Applying F3 and F2 equals strings or rods attached to B and C, forcing the elbow up/right and the hand down/left. If forces F3 and F2 are not applied the resulting movement would be how a rag doll arm would behave in zero G. "A" would moved to F1, "A" pulls the rod that is pulling C with in turn pulls B via the rod B-C.  

 

 

Link to comment
Share on other sites

21 hours ago, DandelionTheory said:

F1 is done to mass A by mass B, F2 is the opposite reaction mass B feels, F3 is the opposite to F2 due to mass B & C being connected.

I’m afraid none of that appears to be correct.

There doesn’t seem to be any mechanism for B to exert a force on A, and vice versa. 

The only thing that can apply a force on A is C. And that force would have to be on the line A-C. With a corresponding force on C in the opposite direction.

If B were exerting a force on C via the fixed coupling between them then that force would have to be aligned with B-C. And then you would need an opposite force on C in the opposite direction. 

 

If the force on B comes from the magnetic field around C then that force must be tangential to that circle, and not the angle you have shown. 

The reaction to that would be (I think) a torque on C, which would also be transferred to A. Which would again be tangential to C; in other words vertical (as things are in the diagram). 

So the forces on A and B would be a long way from being in opposite directions

Also, you seem to be implying that you are “manually” entering the reaction forces (in the sense of Newton’s 3rd law). But the physics engine must be able to account for these automatically or it just would not work. 

The only time it won’t (I assume is where you add a force that comes from something outside the system (eg if you were modelling the effect of gravity). But that implies you are not interested in what happens to that “something”.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.