Hi Brad, For each axis (ie. x, y and z), take the difference between A and B, multiply this by the percentage, and add it to A. Percentage is from A to B (20% is closer to A).
(axisB - axisA) * percentage + axisA = axisC eg. for the x axis, xA = 0, xB = 2, percentage = 20% (0.2) (xB - xA) * percentage + xA = xC (2 - 0) * 0.2 + 0 = 0.4 Answer to your eg. C = (0.4, 1.2, 0.6) Hope this helps, Hugh >Delivered-To: [EMAIL PROTECTED] >X-Authentication-Warning: charon.adi-limited.com: nobody set sender to <[EMAIL PROTECTED]> using -f >X-Accept-Language: en >MIME-Version: 1.0 >Content-Transfer-Encoding: 7bit >Subject: [JAVA3D] another simple question >To: [EMAIL PROTECTED] > >Hi, > >I have two points A and B. > >I need to find a point C that is a certain percentage P along the line >from a to b. > >What formula do I use to determine C given A, B and P ? > > >eg > >A_____________C__________________B > >where A might be (0,0,0) , B might be (2,6,3) and C is 20% along the >line between A and B. > >Cheers, > >Brad > > >---------------------------------------------------------------------------- >This Email may contain confidential and/or privileged information and is >intended solely for the addressee(s) named. If you have received this >information in error, or are advised that you have been posted this Email by >accident, please notify the sender by return Email, do not redistribute it, >delete the Email and keep no copies. >---------------------------------------------------------------------------- > >=========================================================================== >To unsubscribe, send email to [EMAIL PROTECTED] and include in the body >of the message "signoff JAVA3D-INTEREST". For general help, send email to >[EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
