POV-Ray : Newsgroups : povray.advanced-users : Vector Math Problem : Re: Vector Math Problem Server Time
29 Jul 2024 04:27:53 EDT (-0400)
  Re: Vector Math Problem  
From: Francois Labreque
Date: 5 Jan 2003 22:09:42
Message: <3E18F39C.8070000@videotron.ca>
Program ended abnormally on 1/5/03 9:50 PM, Due to a catastrophic Kevin
Loney error:
> How would I go about finding a point on a ray the is equa-distant from to
> other points?

If you have two points,

Pa = < Xa, Ya, Za >
Pb = < Xb, Yb, Zb >

then the point (M) that is in the middle will be:

M = < (Xa+Xb)/2, (Ya+Yb)/2, (Za+Zb)/2 >

Of course, in POV, you can simply use:

M = (Pa+Pb)/2

-- 
/*Francois Labreque*/#local a=x+y;#local b=x+a;#local c=a+b;#macro P(F//
/*    flabreque    */L)polygon{5,F,F+z,L+z,L,F pigment{rgb 9}}#end union
/*        @        */{P(0,a)P(a,b)P(b,c)P(2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)
/*   videotron.ca  */}camera{orthographic location<6,1.25,-6>look_at a }


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.