Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
Solved

# Realistic Ballflight

Posted on 1998-10-06
Medium Priority
257 Views
Hello All,

This is a math \ geometry problem, but don't let that put you off.  If we have any number crunchers in our midst, perhaps they'll like to play with this...

I am looking for a formula which will create a realistic ballflight using parameters of DistanceX and TakeOff Trajectory.  I am currently using "y = (X * (dist - X)) / (dist * Trajectory)" and find this creates a symmetrical
path over which I have sufficient control.

However, this formula does not, of course, allow me to create a path in which the zenith is not absolutely central to the Xdisplacement.  Ideally, this would occur somewhere around 2/3(?) of the distance.

I have considered using 2 formulae to derive the path, with the calculation being processed by the secondary routine after the xdisplacement reaches 2/3 total distance, but can't make it work properly.

I am convinced (but in no way informed) that I need the formula for an 'egg' shape, cut through at an offset angle.

If anyone has any knowledge of parabolas, trajectories, ballistics or amateur golf I would love to hear your ideas.

I think we can treat the mass of the ball as a constant, and ignore any wind effect, but it would be nice to add a parameter which modifies take off velocity.

0
Question by:golfpro
• 2

LVL 86

Accepted Solution

jkr earned 800 total points
ID: 1323030
The trajectory of a constant mass in a gravitational field is always parabolic, the shape of the curve only depends on the inital parameters as velocity and start angle.

The formula is:

y = x * tan ( a) - g / ( 2* v0^2 * ( cos ( a))^2)

where a is the starting angle to the x-axis ( sorry, no alpha sign on my keyboard ;-), g is the earth gravity (9.81 m/s^2) and v0 the initial velocity.
0

LVL 2

Expert Comment

ID: 1323031
But if you want the real trajectory you do need to take into account the effect of drag.  This results in a decelleration of the object. The equation for this is

Acc = - K * V;

Where K is a constant and V the instantaneous velocity.  So the faster the object is going the greater the decelleration.
0

LVL 86

Expert Comment

ID: 1323032
jstolan, you're absolutely right. The problem is that this would end up in solving a multidimensional differential equation of at least degree 2 (as the acceleration is a vector of the components g and Acc, and V  - also vectorial now - depends on the acceleration vector ... &%\$§\$ can't type integral signs here ;-), so it'd be better to assume a constant wind velocity....
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
###### Suggested Courses
Course of the Month10 days, 20 hours left to enroll