Given the two endpoints A and B, the midpoint P of a line is (A + B) / 2. Thus, if
 
A = (xa, ya, za)
B = (xb, yb, zb)
 
P = ( (xa + xb) / 2, (ya + yb) / 2, (za + zb) / 2)
 
I hope this is what you were looking for.
 
Regards,
Martin
 
 
 
 
-----Original Message-----
From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]On Behalf Of Ben Logan
Sent: Tuesday, April 01, 2003 12:45 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Mid-Point of a line

Hi

Can anyone help me, what is the easiest way to find the mid-point of a line,

I’m trying to add a label to some edges in a graph display system.

 

Regards

Ben

 

Reply via email to