physics

Class or Metaclass Design for Astrodynamics Engine

Gurus out there: The differential equations for modeling spacecraft motion can be described in terms of a collection of acceleration terms: d2r/dt2 = a0 + a1 + a2 + ... + an Normally a0 is the point mass acceleration due to a body (a0 = -mu * r/r^3); the "higher order" terms can be due to other planets, solar radiation pressure, thr...

Projectile Motion calculation with chipmunk dynamics.

I need to implement a little bit of Ai that can apply an impulse to a rigid body in order to hit a target. Like a cannon ball being fired from a cannon. I'm using Chipmunk Dynamics for the physics engine. My maths is terrible, as is my physics, but i've been reading up, and with a little help from SO and the following from this wikipedi...

bullet physics : concave moving shape

I am trying to create a concave moving shape using bullet physics SDK but cannot find how to do it. Do you have any idea on how to achieve this? ...

Need help with circle collision and rotation? - Game Physics

Ok so I have bunch of balls: What I'm trying to figure out is how to make these circles: Rotate based on the surfaces they are touching Fix collision penetration when dealing with multiple touching objects. EDIT: This is what I mean by rotation Ball 0 will rotate anti-clockwise as it's leaning on Ball 3 Ball 5 will rotate ...

How can I calculate individual point masses?

I am working on a C# 2d soft body physics engine and I need to assign masses to an object's vertices given: a list of vertices (x,y positions), the total mass for the object, and the center of mass. The center of mass is given as: where, R = center of mass M = total mass mj = mass of vertex j rj = position of vertex j I need an al...

Modeling human running on a soccer field

In a soccer game, I am computing a steering force using steering behaviors. This part is ok. However, I am looking for the best way to implement simple 2d human locomotion. For instance, the players should not "steer" (or simply add acceleration computed from steering force) to its current velocity when the cos(angle) between the steeri...

Matlab: Magnetic fields calculated with biot-savarts-law

Hello! This is the code for the computation of magnetic fields using the biot-savart-law. I hope to get some tipps for the optimization of this code. Regrettably I use german language :( I never will do this again. :) tic clear all; clc; clf skalierungsfaktor = 10^-6; % vom m-Bereich zum mm-Bereich wg. T = Vs / m^2 I = 1; % in A konstan...

Rotation matrix for a bicycle

Assume you have a flat plane, with a bicycle resting on it. As the bicycle enters a turn, it leans into the turn with angle theta. At the same time, the bike frame points in the same direction as the bike velocity. Thus, given the bike velocity vector v (assumed to be in the XZ plane) and the lean angle theta, how can you find the rot...

Good book for Monte Carlo methods in c++?

Hi! Can anybody recommend a good introduction book on Monte Carlo algorithms in c++? Preferably with applications to physics, and even more preferably, the kind of physics being quantum mechanics. Thanks! ...

3d Parabolic Trajectory

Hi, I'm trying to figure out some calculations using arcs in 3d space but am a bit lost. Lets say that I want to animate an arc in 3d space to connect 2 x,y,z coordinates (both coordinates have a z value of 0, and are just points on a plane). I'm controlling the arc by sending it a starting x,y,z position, a rotation, a velocity, and a...

Physics research project on GPUS

Hello all, I am tasked with creating a research project, experimental or theoretical, for Calc-based Physics. I want to do it on something that will relate to my chosen field (Computer Engineering: Software, with testing focus). I came up with GPU and physics. My long winded idea is, "The effect in-game physics have on the heat of a GP...

Unwrapping nested loops in F#.

I've been struggling with the following code. It's an F# implementation of the Forward-Euler algorithm used for modelling stars moving in a gravitational field. let force (b1:Body) (b2:Body) = let r = (b2.Position - b1.Position) let rm = (float32)r.MagnitudeSquared + softeningLengthSquared if (b1 = b2) then VectorFl...

formulas in Projectile Motion?

hi,i am 2D game how can i calculate angle to reach particular height? suppose i want height 320.time is increasing as 0.1. i am using h = (u sin(angle))^2 / 2g; where can i put the time? ...

Physics SDK for Flash with realicstic model

There are some open SDK for Flash, that could be done. Rotating photos with physics? Examples of such programs BumTop, ePic, Coloris (no physics). The photo on the plane, it can be moved to the real physics? ...

angle for particular co-ordinate in projectile path?

Hi, I have xy co-ordinate like (200,200). I know the angle calculation from the origin the ball throws. How can I find the initial velocity to reach that particular xy co-ordinate when ball is thrown in 2d Environment? Iam using x = v0cosq0t; y = v0sinq0t - (1/2)gt2. but time is needed. Without time can I do it? any help please...

What are some algorithms that will allow me to simulate planetary physics?

I'm interested in doing a "Solar System" simulator that will allow me to simulate the rotational and gravitational forces of planets and stars. I'd like to be able to say, simulate our solar system, and simulate it across varying speeds (ie, watch Earth and other planets rotate around the sun across days, years, etc). I'd like to be ab...

XNA Collision Detection - Vector2.Reflect - Help Calculating the Normal of a Circle Sprite - C#

I'm having trouble wrapping my mind around how to calculate the normal for a moving circle in a 2d space. I've gotten as far as that I'm suppose to calculate the Normal of the Velocity(Directional Speed) of the object, but that's where my college algebra mind over-heats, any I'm working with to 2d Circles that I have the centerpoint, ra...

Farseer or Box2D? Top-down shooter physics implementation

Which one of these would fit a top down shooter better? I've heard that Box2D performs faster, but I've also noticed that it lacks wider community support for XNA (it rather seems to be used for flash - for a reason unknown to me). Farseer is however built for XNA, and seems to fit it and perform pretty fine. Farseer's advantage in my ...

How to parse image for border vertices? Complex object geometry (farseer physics)

How could I create body vertices by scanning image and detecting it's shape (of it's non-transparent pixels)? I wanna create complex geometry, and I actually have no real idea where to start, so any advice would be highly appreciated. Accepted answer would most likely be the one that explains the topmost idea. Thanks in advance ...

I'm trying to get basic collision dynamics working

I've simplified things down to cubes/a single cube colliding with an infinite-mass rectangle and the following code: The problem is, the boxes tend to spin too much and get stuck together spinning and, if the binary search is included, just hit and spin a lot. Thanks for any and all help. /// <summary> /// Projects an abstract 1D line...