physics

Triangle - Triangle Intersection Test

我的梦境 提交于 2019-12-21 20:09:40
问题 I'd like to know if there is out there some tutorial or guide to understand and implement a Triangle-Triangle intersection test in a 3D Environment. (i don't need to know precise where the intersection happened, but only that an intersection has occurred) I was going to implement it following a theoric pdf, but i'm pretty stuck at the Compute plane equation of triangle 2. Reject as trivial if all points of triangle 1 are on same side. Compute plane equation of triangle 1. Reject as trivial if

Blocking Movement On Collision

若如初见. 提交于 2019-12-21 06:00:55
问题 i'm developing a 2d game in XNA and i'm currently working on my physics class. and my current task is to stop an object when it's colliding with another. i have made my game call this function when ever 2 objects collide: public void BlockMovement(gameObject target) { //you can call width by just typing width. same for height owner.position.X += (owner.position.X - target.position.X); owner.position.Y += (owner.position.Y - target.position.Y); } the problem is that instead of stopping. the

Neural Network size for Animation system

旧城冷巷雨未停 提交于 2019-12-20 12:39:09
问题 I decided to go with a Neural Network in order to create behaviors for an animation engine that I have. The neural network takes in 3 vector3s and 1 Euler angle for every body part that I have. The first vector3 is the position, the second is its velocity, and the third is its angular velocity. The Euler angle is what rotation the body part is at. and I have 7 body parts. Each one of those data types has 3 floats. 7*4*3 = 84, so I have 84 inputs for my neural network. The outputs are mapped

Help with symplectic integrators

流过昼夜 提交于 2019-12-20 09:59:43
问题 I'm trying to develop a physics simulation and I want to implement a fourth-order symplectic integration method. The problem is that I must be getting the math wrong, since my simulation is not working at all when using the symplectic integrator (as compared to a fourth-order Runge-Kutta integrator that works reasonably well for the simulation). I've been googling this forever and all I can find are scientific articles on the subject. I tried to adapt the method used in the articles, but am

Find phase difference between two (inharmonic) waves

ぐ巨炮叔叔 提交于 2019-12-20 08:59:30
问题 I have two datasets listing the average voltage outputs of two assemblies of neural networks at times t, that look something like this: A = [-80.0, -80.0, -80.0, -80.0, -80.0, -80.0, -79.58, -79.55, -79.08, -78.95, -78.77, -78.45,-77.75, -77.18, -77.08, -77.18, -77.16, -76.6, -76.34, -76.35] B = [-80.0, -80.0, -80.0, -80.0, -80.0, -80.0, -78.74, -78.65, -78.08, -77.75, -77.31, -76.55, -75.55, -75.18, -75.34, -75.32, -75.43, -74.94, -74.7, -74.68] When two neural assemblies are "in phase" to a

How to create an “intercept missile” for a game?

对着背影说爱祢 提交于 2019-12-20 08:49:52
问题 I have a game I am working on that has homing missiles in it. At the moment they just turn towards their target, which produces a rather dumb looking result, with all the missiles following the target around. I want to create a more deadly flavour of missile that will aim at the where the target "will be" by the time it gets there and I am getting a bit stuck and confused about how to do it. I am guessing I will need to work out where my target will be at some point in the future (a guess

Javascript ball collision

落爺英雄遲暮 提交于 2019-12-19 11:57:30
问题 I am trying to create a simple javascript game with simple physics. I can determine when 2 balls are colliding but I have having problems with handling the collision. Does anyone know of any useful tutorials on this? I've been searching the internet for a couple days but can't seem to find anything. 回答1: In the UK, this would be A-level maths, so not too advanced. I think the phrase you need is "elastic collision". That page has some of the formulae you need. 回答2: Physics for JavaScript Games

SpriteKit move rotated physicsBody with applyImpulse

喜欢而已 提交于 2019-12-19 10:46:26
问题 I want to move a physicsBody with the applyImpulse method in a direction based on the physicsBody rotation. Foe example, the physicsBody is a square in shape, I call a "move" which will apply an impulse to make it move up vertically. I then call a method to rotate the physicsBody 45 degrees right. If I call the "move" method again, the physicsBody will move diagonally right and up. Can anyone help please? 回答1: I suggest that you follow Sprite Kit’s coordinate and rotation conventions.

Android get normalized acceleration

爱⌒轻易说出口 提交于 2019-12-19 06:50:09
问题 I wish to get the acceleration vector of an Android phone. The problem is, the accelerometer coordinates are relative to the phone's rotation. What I want is the "absolute" acceleration, i.e., it should return the same values whichever way the phone is facing. (I want to detect if a user that is skiing is sliding down a slope without using GPS. I also need to be able to differentiate sliding and going up the chairlift.) I can probably get those values by combining the accelerometer with the

Simulating orbits using laws of physics [closed]

Deadly 提交于 2019-12-19 03:18:39
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last month . Over the past couple of weeks I've been trying to simulate orbits in a solar system simulation I am making as part of a University module. To cut things short, my simulation is written in C++ using the Ogre3D rendering engine. I have attempted to implement orbits using Newton's law