Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / point projection on a line Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
takis

March 16, 2005, 10:26 AM

Hello,

How can i project a point to a line?
Like here below. I project p and q perpendicular on the line. What are the new coordinates of p and q?

+p0
|
|------------.p
|
|
+p1
.
.------------.q
.
.

 
I'M BRIAN FELLOWS

March 16, 2005, 12:20 PM

DOT PRODUCT.

 
Wernaeh

March 17, 2005, 06:56 AM

((norm(p1 - p0)) dot (p - p0)) * norm(p1 - p0)

Cheers,
- Wernaeh

 
This thread contains 3 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.