physics

PhysX Linker Problem on 64-bit Ubuntu

Hello. I am having a problem getting my project to link with the PhysX libraries on my 64-bit machine. It compiles perfectly fine. I've used the exact same settings as on my 32-bit machine (with the exception of some debugging flags), which links perfectly fine. Here is the build output: g++ -L/usr/lib/PhysX/v2.8.1 -L/usr/lib -o"...

PhysX NxActor Question

Hi. As far as I know, using the PhysX API, the only way to obtain an NxActor is from an instance of NxScene using the createActor method. This is really bugging me. I want to keep my code clean, but I feel like there is no choice but to go around passing this scene from constructor to constructor so that classes can make and have refe...

Compilers and beyond

I want to go backwards and learn more about how compilers, processors and memory operate on my programs. I am also interested in the physics on which all of this depends. Any good references or books would be appreciated... ...

Should I use Java applets or Flash to make webpage-embeddable physics simulations?

I want to start working on some simple physics simulations that I can embed onto my website. I have a lot of experience with web programming with languages like PHP and javascript, a fair amount of experience with python and some experience with C++. Should I use Java applets, Flash or something else? Also, could you please recommend a...

WPF: Speed of Movement (Translation) varies with distance

With reference to this programming game I am currently building. I wrote the below method to move (translate) a canvas to a specific distance and according to its current angle: private void MoveBot(double pix, MoveDirection dir) { if (dir == MoveDirection.Forward) { Animator_Body_X.To = Math.Sin(Heading...

Water simulation with a grid

For a while I've been attempting to simulate flowing water with algorithms I've scavenged from "Real-Time Fluid Dynamics for Games". The trouble is I don't seem to get out water-like behavior with those algorithms. Myself I guess I'm doing something wrong and that those algorithms aren't all suitable for water-like fluids. What am I do...

How can I manipulate a RagDoll made with farseer physics in Silverlight?

I made a ragdoll similar to the one in this demo. This rag doll will be used for a turn based rpg game where the physics will be used for animations such as character taking damage, dying, falling down, etc. What I am pondering at the moment is as how should go about this, should I stick the rag doll by the head to the background (leavi...

How to calculate bounce angle?

I played around with it for a while, but i simply cant figure it out. I made a tank that fires missiles, and when the missiles hit the walls, i want them to bounce off, but i want them to bounce off to the right angle. Right now i havent got any obstacles, the missiles just bounce off when they get outside the viewportRectangle i made....

Help me with Rigid Body Physics/Transformations

I want to instance a slider constraint, that allows a body to slide between point A and point B. To instance the constraint, I assign the two bodies to constrain, in this case, one dynamic body constrained to the static world, think sliding door. The third and fourth parameters are transformations, reference Frame A and reference Frame B...

How can I optimize my basic physics simulator?

I've written a simple physics modeler that allows me to bounce balls around the screen. You can click and drag to launch a ball, or you can generate balls hundreds at a time and watch them interact with eachother. [Link to larger version] It has been a fun little program to work on and I want to take it further if I can. I know they ...

How to do numerical integration with quantum harmonic oscillator wavefunction?

How to do numerical integration (what numerical method, and what tricks to use) for one-dimensional integration over infinite range, where one or more functions in the integrand are 1d quantum harmonic oscillator wave functions. Among others I want to calculate matrix elements of some function in the harmonic oscillator basis: phin(x...

Where do I start to write/use a 3D physics simulation engine?

I need to write a very simple 3D physics simulator in Java, cube and spheres bumping into each other, not much more. I've never did anything like that, where should I start? Any documentation on how it is done? any libraries I could re-use? ...

Bouncing Ball in Java

This is probably a really basic problem but I can't seem to find any other articles on it. Anyway, I have written a small bouncing ball program in Java to try and expand my basic skills. The program is just a simple bouncing ball that will drop and hopefully bounce for a while. The original program worked fine but now I have tried to ad...

How would you keep a top view of a train on the tracks with the Box2D physics engine?

I think it would be fun to model a top view of a train following a track, traversing switches and so on, using a physics library like Box2D. What joints and motors would I need to make this work? I'm curious about how to implement the forces needed to make the car follow a spline track so it can bump into other train cars, pedestrians, ...

How can the friction drag be calculated for a moving and spinning disk on a 2D surface?

Let's consider a disk with mass m and radius R on a surface where friction u also involved. When we give this disk a starting velocity v in a direction, the disk will go towards that direction and slow down and stop. In case the disk has a rotation (or spin with the rotational line perpendicular on the surface) w beside the speed then ...

How can I fix this Implicit Coercion error in Flash?

I'm playing with a Physics Engine for AS3 and the code below is basically the hello world example. However, I made a slight change by declaring the property "ball" as a WheelParticle at the beginning of the class definition. (forgive my terminology if it's wrong). Before, it was declared inside the constructor as var ball:WheelParticle...

Constant speed for wheel of any radius when setting speed in radians per second?

In box2d physics engine I can set a motor speed for a joint on my wheel in Radians/Second. What would be an expression I could set the speed to so the final actual "speed" of the wheel would be the same regardless of wheel radius. Presently, I'm setting the Wheel speed as a constant, wheelSpeed = 20. But this has the effect of making...

WPF: Connect UIControls with a rope which behaves physically correct (inspired by Pixelmator)

Pixelmator [1] has a quite impressive GUI. So far I've just played a bit with it. If you are using a filter, which is applied to a part of a picture, the window in which the parameters of the filter can be set is connected with a rope to the concerning part of the image (see 2). However I was wondering about two things. How do I impleme...

Orbital Mechanics

Does anyone have an example of implementing Orbital Mechanics (preferably in XNA)? The code I am currently using is below, but it doesn't "feel right" when it executes. The object just bends ever so slightly to the planet, and no matter how much I tweak the variables I cant get it to enter an orbit, or even a partial orbit. shot.Posi...

Not a number error (NAN) doing collision detection in an iphone app

I have a set of balloons that I am trying to get to bounce off of each other like balls. When I start to move them and then detect collision, the routine for the collisions eventually returns a NAN for the velocity of the balloons. I end up with a position of something like x=270, y= -nan(0x400000). I've been looking at the code all d...