projectile

Implementation of Runge Kutta Fourth Order in c++ [closed]

爷,独闯天下 提交于 2019-12-14 03:31:56
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . So I should start by saying that this is my first attempt a executable script, and my first ever c++ script. Bearing this in my mind my problem is as follows. I'm attempting to create a script which shall integrate projectile motion with the use of the Fourth Order Runge Kutta method. Currently my script is

How to get smoother 2d projectile physics

最后都变了- 提交于 2019-12-11 07:14:10
问题 So I want to start working on a 2D platforming game, and I won't be in physics till next year, so I found the equations in an old physics book I had to help be find the x and y positions along with their velocities. The problem is, they seem to accelerate too fast in that the rendering is too slow. It's not the programs fault, its my fault in that I don't know how to slow down the acceleration so that it looks smoother. Here is the code for the ball class that i'm using (i know the code is an

Python Animation of projectile giving straight line

微笑、不失礼 提交于 2019-12-11 04:33:46
问题 The goal is to animate/simulate a sprinkler. The basic idea is to create multiple droplets at an instance, each exiting the sprinkler at a different angle. However, instead of having a point that moves along, I'm getting a straight, static line. I've tried the same code with only one or 2 drops/points, but I still get the same straight line. At first I thought it was because I included drag into the animation (in previous trials I got strange/unexpected results when I included the drag, so I