+ Reply to Thread
Results 1 to 6 of 6

Formula to draw known didtance between parallel lines.

  1. #1
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Formula to draw known didtance between parallel lines.

    Hello, I need a geometry expert.
    I need to draw an unknown parallel line exactly 11 from a known line.

    Please see attached. So once the second line is drawn, the distance between the two will be 11.

    If you can get it going on the chart, maybe take a look at the VBA code as well.

    Thanks alot.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Formula to draw known didtance between parallel lines.

    davesexcel

    Explain me in more detail
    Check the attached file , i am not sure just tried

    Punnam
    Attached Files Attached Files

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Formula to draw known didtance between parallel lines.

    Thanks Punnam,

    You just added 11 to the x column, I need the parallel line to be 11 from the original.

    hmm...
    does anybody remember the formula
    something like
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    it's been so long.
    Last edited by davesexcel; 11-05-2014 at 12:47 AM.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Formula to draw known didtance between parallel lines.

    Via formula?

    Row\Col
    A
    B
    C
    D
    1
    x
    y
    2
    point1
    0.000
    0.000
    B2:C3: Input
    3
    point 2
    0.500
    2.000
    4
    5
    angle
    distance
    6
    (90.000)
    11.000
    B6:C6: Input
    7
    8
    matrix
    0.000
    (5.336)
    B8:C9: {=C6/SQRT(SUMSQ(B3:C3-B2:C2)) * CHOOSE({1,2;3,4}, COS(RADIANS($B$6)), SIN(RADIANS($B$6)), -SIN(RADIANS($B$6)),COS(RADIANS($B$6)))}
    9
    5.336
    0.000
    10
    11
    par point1
    10.672
    (2.668)
    B11:C11: {=MMULT(B3:C3 - B2:C2, B8:C9)}
    12
    par point2
    11.172
    (0.668)
    B12:C12: {=B11:C11 + B3:C3 - B2:C2}


    B8:C9 calculates a rotation and scaling matrix. That's applied to the vector from point1 to point2 to get a point on the parallel line (B11:C11). A second point of the line is calculated by adding the direction vector from the first line.
    Last edited by shg; 11-06-2014 at 11:37 AM.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Formula to draw known didtance between parallel lines.

    Right on thanks.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Formula to draw known didtance between parallel lines.

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to auto sum with irregualr rows with existing formula and bold it and draw lines
    By ec4excel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-07-2014, 07:27 AM
  2. [SOLVED] Find Matching Parallel Lines, no matter how many.
    By stockgoblin42 in forum Excel General
    Replies: 12
    Last Post: 05-21-2013, 02:52 PM
  3. Draw Parallel Line Through Scatter Plot
    By IronMan79 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-07-2009, 04:05 PM
  4. Draw lines in a chart
    By ravichander in forum Excel Charting & Pivots
    Replies: 33
    Last Post: 07-12-2008, 08:31 AM
  5. To Draw A Line Parallel To A Curve At Particular Offset
    By vijay4u in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-08-2006, 11:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1