Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Line that most closely passes through a set of points?

This topic is 5484 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a set of points in the order that they should form the line, but they do not perfectly lie on the line. How would I get the equation of the line that most closely lies on the points? Help would be much appreciated. Edit: Actually all I need is the gradient. What im gonna do now is get the gradient of each segment between the points, and average their gradient. If anyone knows of a better solution, please say. [edited by - FearedPixel on November 16, 2003 1:00:26 PM]

Share this post

Link to post
Share on other sites
I believe the method of least squares is what is normally used.


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!