+ Reply to Thread
Results 1 to 9 of 9

Plot a Point on the Curve at a Distance expressed in Percent of Length

  1. #1
    Registered User
    Join Date
    12-29-2009
    Location
    Perth, Australia
    MS-Off Ver
    Microsoft Office 365
    Posts
    7

    Lightbulb Plot a Point on the Curve at a Distance expressed in Percent of Length

    I am trying to plot a point on a curve. The curve is specified with x,y data. I had some success calculating the length of the curve.

    Movement.png

    My requirement is to plot a point on this curve at a percent length of the curved line. But still struggling to plot the point at a specified percentage of length at Cell:C17. Please assist.
    Attached Files Attached Files
    Last edited by rajbhar_s; 06-23-2019 at 10:50 PM.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,826

    Re: Plot a Point on the Curve at a Distance expressed in Percent of Length

    Not sure what your question is. The formula you describe seems to be correct, if the goal is to find the point that is 45% of the distance along the final line segment. I am guessing that you are posing the question because you want something other than the 45% point along the final line segment. I am guessing that you want the 45% point along the full length of the curve (in this case, if I understood it correctly, I believe the correct answer for 45% should be (52.2, 1330)). Assuming I am understanding, here's an overview of how I would do this:

    1) Add a column that computes the length of each segment.
    2) Add a second column that computes the running total length
    3) Compute the desired 45% (or whatever%) distance of the overall length and use a lookup function (approximate match option) to find the segment associated with that distance.
    4) Extract the x and y coordinates for the desired segment, figure out the length along that segment, and finally figure out the point representing the 45% overall position.

    Am I understanding correctly? Which part of that kind of solution do you need help with?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    12-29-2009
    Location
    Perth, Australia
    MS-Off Ver
    Microsoft Office 365
    Posts
    7

    Re: Plot a Point on the Curve at a Distance expressed in Percent of Length

    Yes. 45% is over the length of the curve with 0% at (35.417, 1658.57) and 100% at (58.295,1060.79). Since it's a non-linear curve, I cannot use slope-intercept relation.

    And, I tried along the same methodology as you explained in your 4 points. I followed your solution till Point-2, I will post the spreadsheet again once tried points 3 and and 4.

    Much appreciate showing me a path to solve this. I am bit ambitious to get the new_X and new_Y solved in a just two cells.

  4. #4
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Plot a Point on the Curve at a Distance expressed in Percent of Length

    I used a few helper columns and this formula to work out the x (a similar for the y) point

    Please Login or Register  to view this content.
    but easier to see in the attached sspreadsheet
    Happy with my advice? Click on the * reputation button below

  5. #5
    Registered User
    Join Date
    12-29-2009
    Location
    Perth, Australia
    MS-Off Ver
    Microsoft Office 365
    Posts
    7

    Re: Plot a Point on the Curve at a Distance expressed in Percent of Length

    Thanks Crooza!

    You nailed it bro! Cheer!

  6. #6
    Registered User
    Join Date
    12-29-2009
    Location
    Perth, Australia
    MS-Off Ver
    Microsoft Office 365
    Posts
    7

    Re: Plot a Point on the Curve at a Distance expressed in Percent of Length

    Still wondering though, how could I get rid of the two extra columns, since I have over 100 points to extrapolate.

  7. #7
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,826

    Re: Plot a Point on the Curve at a Distance expressed in Percent of Length

    My question -- because I like to use helper columns: Why do you need to get rid of the columns? Even in the older version (your profile says you are using 2003), you have 250 columns. Using 2 helper columns is a pretty small portion of the available columns (if your profile is in error and you have a newer version, then you have 16000 columns to use). If you find them offensive, these helper columns can be hidden (Select the full columns -> right click -> hide).

    I would also note that, if you did get rid of the helper columns, then each copy of the formula (assuming you need multiple copies of the formula), would need to recreate these arrays resulting in a lot of duplicated effort. This duplicated effort leads to slow, inefficient spreadsheets.

    It could be my personal programming bias, but I see no advantage to trying to get rid of these helper columns, and lots of advantages to keeping them. Hide them, if you don't want to look at them, but I would not try to eliminate them.

  8. #8
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Plot a Point on the Curve at a Distance expressed in Percent of Length

    I’m with MrShorty on this. There seems to be a fixation on completing multiple calculations in one formula. While it may be a great achievement to do so I find it difficult to follow if i’ve Got to make changes at a later stage. Having helper columns helps debug and can give you an overview of what’s happening at a glance. You can hide them move them to the far right of the sheet or even put then on other tabs if you don’t like looking at them.

  9. #9
    Registered User
    Join Date
    12-29-2009
    Location
    Perth, Australia
    MS-Off Ver
    Microsoft Office 365
    Posts
    7

    Thumbs up Re: Plot a Point on the Curve at a Distance expressed in Percent of Length

    Dear MrShorty, Crooza,

    Your reasoning makes lots of sense, I think I will keep this solution for following merits,
    1. Easy maintenance of the equations,
    2. Utilizing available columns (when I have enough of them)
    3. No further head breakings

    Thanks a bunch for your expert opinions!

    Cheers,
    Sanjay

+ 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. distance and length of points along the line
    By sanju2323 in forum Excel Programming / VBA / Macros
    Replies: 62
    Last Post: 06-15-2022, 01:21 AM
  2. Length and distance from the line coordinate and point coordinate
    By sanju2323 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-02-2019, 03:13 PM
  3. [SOLVED] find the X Y coordinate using length and distance.
    By sanju2323 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-26-2019, 04:16 AM
  4. calculate maximum distance from a line that intersects a curve
    By DRAGOS ROTARU in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-03-2016, 06:01 AM
  5. Replies: 5
    Last Post: 10-23-2011, 03:44 PM
  6. Distance from a point to a curve
    By bjack205 in forum Excel General
    Replies: 14
    Last Post: 02-04-2011, 02:10 PM
  7. [SOLVED] Plot the sin curve along the line y=x
    By Rbp9ad in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 12-20-2005, 08:50 PM

Tags for this Thread

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