+ Reply to Thread
Results 1 to 5 of 5

Making scatter with only known begin coordinates, angle in rad. and length

  1. #1
    Registered User
    Join Date
    10-17-2017
    Location
    Netherlands
    MS-Off Ver
    Mac
    Posts
    4

    Making scatter with only known begin coordinates, angle in rad. and length

    Hi all,

    I am trying to recreate the graph I saw in a study. It consists of lines of different lengths which all start from the same point (412,1333), of which I only have the length and the angle of the line in radians. So what I basically want to know is:

    When a line starts in (412,1333) and has an angle of for example 2.62 in radians, with a length of for example 134, how do I calculate the coordinates of the endpoint of the line?

    When I have the coordinates, I can easily make a scatter with connecting lines.

    It feels very simple but I just cannot think of the way to fix this problem.

    Thank you guys!

    Best,

    Marrie

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,626

    Re: Making scatter with only known begin coordinates, angle in rad. and length

    In your case endpoint coordinates (assuming angle is measured anticlockwise, starting from x axis) are:

    x = xstart + length*cos(angle)
    y = ystart + length *sin(angle)

    so if your 412 and 1333 are in cells C1 and D1
    and length and angle in A2 and B2
    write in C2:=C$1+A2*COS(B2)
    and in D2:=D$1+A2*SIN(B2)

    you can write next pairs length, angle below in columns A and B and copy formulas from C2 and D2 down

    now select columns C and D and insert scatterplot.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    10-17-2017
    Location
    Netherlands
    MS-Off Ver
    Mac
    Posts
    4

    Re: Making scatter with only known begin coordinates, angle in rad. and length

    Hi Kaper,

    thanks for your help, it seems to work.
    But how do I connect the lines from the midpoint to the coordinates we just calculated?

    Best,

    Marrie

  4. #4
    Registered User
    Join Date
    10-17-2017
    Location
    Netherlands
    MS-Off Ver
    Mac
    Posts
    4

    Re: Making scatter with only known begin coordinates, angle in rad. and length

    Hi Kaper,

    Another question; it seems that the coordinates are exactly opposite to where they should be(so if they are below the midpoint they should be above the midpoint and vice versa.
    Do you know how to fix this?

    Thanks!

    Best,

    Marrie

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,626

    Re: Making scatter with only known begin coordinates, angle in rad. and length

    1) below/above (but right/left is OK I assume) - so angle is probably measured clockwise.
    Keep X formula unchanged, and modify Y:
    y = ystart - length *sin(angle)
    so:
    D2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    conecting lines:
    you need:
    center coordinates
    first point coordinates
    center coordinates
    second point coordinates
    center coordinates
    third point coordinates
    etc.

    I do not know layout of your data. So let's assume is the one I used before
    May be easy way will be add empty row below each pair (length, angle) and then copy formulas from C2:D2 to columns C and D in these empty rows. As in added rows columns A and B are empty the formulas in C and D will return coordinates of center.

+ 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. xy coordinates to angle/degree
    By RODAWG in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 10-07-2015, 08:59 AM
  2. Angle between two coordinates
    By messiah7 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2015, 04:05 AM
  3. Return Scatter Plot Coordinates
    By Dendrinos2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-24-2014, 07:12 AM
  4. [SOLVED] Scatter chart to ploy x,y coordinates
    By dpsersimon in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-27-2013, 01:34 AM
  5. Replies: 4
    Last Post: 09-03-2012, 06:53 PM
  6. [SOLVED] How to get x,y coordinates of point from scatter chart in VBA
    By Milo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-28-2005, 08:25 PM
  7. [SOLVED] Scatter plot points x and y coordinates
    By Milo in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 11-28-2005, 07:25 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