We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › How to Calculate a point on a line...
Pages: 1 2 
How to? Calculate a point on a line... (Read 3545 times)
Re: How to? Calculate a point on a line...
Reply #15 - Dec 12th, 2009, 10:17am
 
GonGaxPT wrote on Dec 12th, 2009, 10:03am:
Biscuiting wrote on Dec 12th, 2009, 9:58am:
I'm not sure if this is what you need but I needed something similar the other day. After several hours of searching I found this and it was exactly what I was looking for.


X = point1.x + (point2.x - point1.x) * Ratio
Y = point1.y + (point2.y - point1.y) * Ratio


I will give it a try! Smiley Tnx



Worked perfectly! Thanks everyone for your help... Smiley
Re: How to? Calculate a point on a line...
Reply #16 - Dec 12th, 2009, 10:43am
 
Fantastic. I couldn't believe it was so hard for me to find that answer when it seemed like such a common need.
Pages: 1 2