User Name Remember Me? Password

 Algebra Pre-Algebra and Basic Algebra Math Forum

 February 28th, 2008, 11:01 PM #1 Newbie   Joined: Feb 2008 Posts: 2 Thanks: 0 Help : Extending line by a length I am trying to do function in C to calculate extending line by a length. While I think the formula probably something to do with Pythagoras' theorem, I can't figure it out. Given a straight line, from point A to point B , I want to extend the line by certain length (from point B to point C). For example A => (5, 11) B => (12, 15) Length = 7, what is point C ? Thanks. February 29th, 2008, 09:00 AM #2 Member   Joined: Feb 2008 From: Dayton, OH, USA Posts: 33 Thanks: 0 Let us call the x and y components in each of the ordered pairs as follows: A = (Ax, Ay) B = (Bx, By) C = (Cx, Cy) Now let us call the slope of the line m and it can be obtained from points A and B: m = (By - Ay) / (Bx - Ax) = (Cy - By) / (Cx - Bx) And suppose we want to extend the line by length L from point B to C, we know that: L² = (Cx - Bx)² + (Cy - By)² Using these two equations we can derive expressions for Cx and Cy in terms of known quantities. I won't go through the algebra here but the results are: Cx = L / √(m² + 1) + Bx Cy = L*m / √(m² + 1) + By Thus plugging in the numbers for your example gives: Cx = 49/√65 + 12 Cy = 28/√65 + 15 February 29th, 2008, 05:43 PM #3 Newbie   Joined: Feb 2008 Posts: 2 Thanks: 0 Interesting solution. Yesterday a friend of mine suggest another way of calculating extended line. This have to do with Pythagoras' theorem, the idea is finding the unit of hypotenuse affected by width and height. W = Width H = Height Hypo = hypotenuse W = Bx - Ax H = By - Ay Hypo = sqrt((W * W) + (H * H)) // square root of ((W * W) + (H * H)) Cx = (W / Hypo) * (Hypo + Length) Cy = (H / Hypo) * (Hypo + Length) I tried this formula via program simulation, rotating extended straight line by 10 degrees each step until it reach 360 degrees. It works. Tags extending, length, line Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Similar Threads Thread Thread Starter Forum Replies Last Post Daltohn Calculus 6 November 3rd, 2013 06:52 AM daver4180 Calculus 1 March 3rd, 2013 07:53 AM bilano99 Trigonometry 2 August 3rd, 2012 07:28 AM konki47 Algebra 0 October 23rd, 2009 03:10 PM serialkisser Algebra 3 November 5th, 2008 02:52 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top      