Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given a roughly drawn line (i.e. a squiggle) consisting of, say a few dozen points, how do I extend the line in keeping with the last few points of the line, i.e. if the line was curving downwards at a rate how do I extend that behaviour by a few points?

I'm imagining there might be something along the lines of: given an array of points, taking the last 3 or 4 points as arguments, this function will calculate the next 3 or 4 points as if the curving trend had continued in the same way?

Also, I'm a mathematical amateur and ideally need something I can readily convert into code. Any tips on tags would be helpful too because this is my first post and others will probably be in a similar category.

share|cite|improve this question

A key word to look up might be "splines".

share|cite|improve this answer
Bit to broad a keyword. I'm thinking I'm a database programmer that's trying to find some inroads into mathematical graphics programming (a big wide gulf) – descf Sep 4 '12 at 22:17
Too broad? Try "cubic splines". – Gerry Myerson Sep 5 '12 at 2:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.