Hi,
What is A, B, C and AB? I assume you use ^ to indicate unit vector (a
bit strange imo ;)
-M
Amir Taaki wrote:
> Hi!
>
> So right now to find the closest point on a line segment I project the
> vectors. Then to see if the point is outside the segment I do,
>
> c = C - A
> if (c^ = AB^)
> {
> if (|c| < |AB|) => lies inside segment
> else
> return B
> }
> else
> return A
>
> Is there a way to do it without a sqrt? the one needed to calculate the
> unit vectors?
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Crystal-main mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/crystal-main
> Unsubscribe: mailto:[EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]