Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 228831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:42:55+00:00 2026-05-11T19:42:55+00:00

I am trying to map a trajectory path between two point. All I know

  • 0

I am trying to map a trajectory path between two point. All I know is the two points in question and the distance between them. What I would like to be able to calculate is the velocity and angle necessary to hit the end point.

I would also like to be able to factor in some gravity and wind so that the path/trajectory is a little less ‘perfect.’ Its for a computer game.

Thanks F.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:42:55+00:00Added an answer on May 11, 2026 at 7:42 pm

    This entire physical situation can be described using the SUVAT equations of motion, since the acceleration at all times is constant.

    The following explanation presumes understanding of basic algebra and vector maths. If you’re not familiar with it, I strongly recommend you go read up on it before attempting to write the sort of game you have proposed. It also assumes you’re dealing with 2D, though if you’re dealing with 3D most of the same applies, since it’s all in vector form – you just end up solving a cubic instead of quadratic, for which it may be best to use a numerical solver.


    Physics

    (Note: vectors represented in bold.)

    Basically, you’ll want to start by formulating your equation for displacement (in vector form):

    r = ut + (at^2)/2

    r is the displacement relative to the start position, u is the initial velocity, a is the acceleration (constant at all times). t is of course time.

    a is dependent on the forces present in your system. In the general case of gravity and wind:

    a = F_w/m – g j

    where i is the unit vector in the x direction and j the unit vector in the y direction. g is the acceleration due to gravity (9.81 ms^-2 on Earth). F_w is the force vector due to the wind (this term disappears for no wind) – we’re assuming this is constant for the sake of simplicity. m is the mass of the projectile.

    Then you can simply substitute the equation for a into the equation for r, and you’re left with an equation of three variables (r, u, t). Next, expand your single vector equation for r into two scalar equations (for x and y displacement), and use substitution to eliminate t (maths might get a bit tricky here). You should be left with a single quadratic equation with only r and u as free variables.

    Now, you want to solve the equation for r = [target position] - [start position]. If you pick a certain magnitude for the initial velocity u (i.e. speed), then you can write the x and y components of u as U cos(a) and U sin(a) respectively, where U is the initial speed, and a the initial angle. This can be rearranged and with a bit of trignometry, you can finally solve for the angle a, giving you the launch velocity!


    Algorithm

    Most of the above description should be worked out on paper first. Then, it’s simply a matter of writing a function to solve the quadratic formula and apply some inverse trigonometric functions to get the result.


    P.S. Sorry for all the maths/physics in this post, but it was unavoidable! The OP seemed to be asking more about the physical rather than computational side of this, anyway, so that’s what I’ve provided. Hopefully this is still useful to both the OP and other people.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 119k
  • Answers 119k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Please take 15 minutes to understand LINQ to XML! It… May 11, 2026 at 11:55 pm
  • Editorial Team
    Editorial Team added an answer InitializeComponent() will instantiate your markup, including the binding. At that… May 11, 2026 at 11:55 pm
  • Editorial Team
    Editorial Team added an answer I know this is pretty easy to make using WPF… May 11, 2026 at 11:55 pm

Related Questions

I am trying to map a legacy database here and I'm running into a
I am trying to map several tables using Fluent Nhibernate. My tests are giving
Its been one of those days can someone help me out with this. I
I am trying to use Lambda Expressions in a project to map to a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.