Apr 13th, 2017, 12:07 PM
Transference of spin from one object to another.
I've been trying to find a solution to a physics problem for a few days now without success. I wonder if anyone here has either done this before or has a link to an example.
I'm messing around with physics problems in a sandpit, nothing at all serious. I'm working on collision resolution at the moment. I know there are loads of physics engines I could employ, but I'd sooner learn something rather than simply plugging in someone else's code.
I'm really happy with my collision detection and resolution vectors, but I want to produce or change the amount of spin/rotation of the objects at the point of collision. An object brushing another, through torque and friction, will alter the spin of both objects. All the objects are circular and my collision detection runs on radii.
I can find examples of this kind of thing, but they're either written in C or math equations, and I read neither. I'm kind of fluffing it at the moment...
-Find the tangent of the collision points.
-deduct from the angle of attack. (of the first object)
-inverse this against Pi/2
Now I have a value from Pi/2 to 0, the higher value producing the most effect. I will then need to multiply by the total energy of impact (massA*VelocityA + etc etc) then divide by some arbitrary value. Then I'll need to adjust the result to account for the mass of each object. Once this calculation is honed and I've clamped the results I'll probably get something that looks visually, ok.
But this is a fluff. I'd sooner write something that is more physically accurate.
Has anyone done anything similar? I really don't like to copy code, but does anyone have an example of this or something similar?
Very many hopeful thanks...
Apr 13th, 2017, 12:45 PM
Re: Transference of spin from one object to another.
So what language are you looking for?
they're either written in C or math equations, and I read neither
All advice is offered in good faith only. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/
C, C++ Compiler: Microsoft VS2017
Tags for this Thread
Click Here to Expand Forum to Full Width
Survey posted by VBForums.