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 6766329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:49:02+00:00 2026-05-26T14:49:02+00:00

I need assistance in simulating movement between 2 points in a plane. Consider two

  • 0

I need assistance in simulating movement between 2 points in a plane. Consider two points P1:(x,y1) and P2:(x2,y2). I compute the distance between P1 and P2, say D, and I choose a random velocity, say V. Next, I compute the time required to move from P1 to P2, say T. Finally, I compute the equation of the straight line between P1 and P2 as y = mx + b.

For example, let T = 10 seconds. For the first 9 seconds, I would like to generate points per second on the straight line until I reach point P2 at the 10th second. Could you please assist me in doing so.

  • 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-26T14:49:03+00:00Added an answer on May 26, 2026 at 2:49 pm

    The best approach is to use parametric equations

    x = x1 + t*(x2 - x1)
    y = y1 + t*(y2 - y1)
    

    where t is the “time” parameter going from 0 to 1 (0.5 means for example halfway).

    If you also like your movement to be “soft” (starting from zero velocity, then accelerating then slowing down and stopping on the arrival point) you can use this modified equation

    w = 3*t*t - 2*t*t*t
    x = x1 + w*(x2 - x1)
    y = y1 + w*(y2 - y1)
    

    The following is a plot of the w curve compared to a linear distribution t with 11 points (t=0.0, 0.1, … 0.9, 1.0):

    enter image description here

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

Sidebar

Related Questions

I want to calculate the relative bearing between two geo-coordinate points. I've gone ahead
I need assistance finding a delivery method that best fulfills the following requirements: We
I need assistance with overlaying one individual div over another individual div . My
I'm back again to show my ignorance once more. I need assistance grabbing numbers
I need some assistance in Qt on Windows 7. It seems that Qt readyRead()
I need some assistance writing what should be a fairly basic .BAT file. I
Need assistance to do this. Or advice about how to add string to string
I'm learning the FB api and I need assistance with one issue. I'm attempting
Need assistance to develop background service on Blackberry with C#, how to? Please help,
I need assistance with creating a jquery function that will display a popup message

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.