+ Reply to Thread
Results 1 to 12 of 12

Calculate angles and distances from XYZ-points

  1. #1
    Registered User
    Join Date
    07-14-2013
    Location
    N/A
    MS-Off Ver
    Excel 2021 - 64 bit on Win11
    Posts
    42

    Calculate angles and distances from XYZ-points

    Hello,

    From 3D, I export xyz points and polygons in ASCII file to Excel.
    I need to cut and mill in wood all polygons but for this I need to know the exact measurements and angles from the points.
    When a polygon touch another I need to know the mill angle to put them nice together.

    If someone can help me with a few formulas or VBA i will be very happy
    I think i found the formulas for distance but not sure...

    To help you I made example with a few measurements in the attachment.

    Thank you for read this,

    Gia

    XYZ.xls

  2. #2
    Registered User
    Join Date
    05-25-2012
    Location
    toronto
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Calculate angles and distances from XYZ-points

    excel is not built for stuff like this..... you might want to take a look at autocad inventor

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

    Re: Calculate angles and distances from XYZ-points

    I don't know, vgr, I think Excel can do this sort of thing just fine. As you say, there are almost certainly programs (like a CAD program) that already have the geometric/trigonometric formulas for this sort of thing pre-programmed in which would make it easier. But, if we give Excel the proper formulas, Excel is perfectly capable of performing geometric/trigonometric calculations for us.

    I guess, Giake, I would ask you this question: What exactly do you need help with? Do you know the geometric/trigonometric formulas for this and just need help putting those formulas into Excel? If so, I would point you to this list of math and trig functions http://office.microsoft.com/en-us/ex...944.aspx?CTT=1 which will help you understand how to use each of Excel's trig functions. If you need further help understanding how to build the formulas in Excel, explain the formulas to us (to save us the work of deriving the functions ourselves) and we'll help you put them into Excel.

    If your question is more "how do I use geometry/trigonometry to derive the formulas", then let us know. Some of us here should understand geometry well enough to help you derive the formulas (though someone on a CAD or math/geometry forum might be able to do the derivation faster because they will likely be more familiar with the geometry at the start).
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    07-14-2013
    Location
    N/A
    MS-Off Ver
    Excel 2021 - 64 bit on Win11
    Posts
    42

    Re: Calculate angles and distances from XYZ-points

    Hello MrShorty,

    We work in Cinema 4D but the advantage of Excel is for us the presentation of our work as student-artist. With imagination, VBA and formulas we can reach in Excel our dreams…
    The only thing that stop us is the formula or VBA/functions to calculate the angle between 3-points.
    And maybe the z-distance is no need?
    We got the formula to calculate the distance between three points from the Dutch-forum and made mistake to put our problem in the English-forum too. Apologize for this!

    We want to thank you for the link, your time and reply,

    Gia & Christina

  5. #5
    Registered User
    Join Date
    05-25-2012
    Location
    toronto
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Calculate angles and distances from XYZ-points

    wow. Good stuff! never knew excel could be used for something like this!

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Calculate angles and distances from XYZ-points

    and here is the link to the dutch free forum.

    http://www.worksheet.nl/forumexcel/s...ad.php?t=85854

    The give formula is:

    dutch =WORTEL((C7-C6)^2+(D7-D6)^2+(E6-E7)^2)

    English
    Please Login or Register  to view this content.
    Last edited by oeldere; 07-19-2014 at 01:04 PM.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  7. #7
    Registered User
    Join Date
    07-14-2013
    Location
    N/A
    MS-Off Ver
    Excel 2021 - 64 bit on Win11
    Posts
    42

    Re: Calculate angles and distances from XYZ-points

    @oeldere,
    You can find work formula in my attachment above…

    Have study the link from MrShorty and I think the angle is solvable with cosines
    Its look alike that first I need to know distance of the 3-points before calculate the angle!?
    Let say I have A, B and C points en A is the center point
    First I calculate the distance between A-B, B-C and C-A by using SQRT and the 3 YXZ-points.
    The angle of A(center point) = ARCCOS((B^2-A^2-C^2) / 2*A*C )

    Not sure if this is correct and for the angle I don’t need any more the z-point, right?

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Calculate angles and distances from XYZ-points

    @Giake

    I don't see any attachment added.

    P.s. I can't help you with this question.

  9. #9
    Registered User
    Join Date
    07-14-2013
    Location
    N/A
    MS-Off Ver
    Excel 2021 - 64 bit on Win11
    Posts
    42

    Re: Calculate angles and distances from XYZ-points

    @oeldere,
    Oh, look above in the first post just under my name(Gia) you will find (normally) "XYZ.xls"
    You can later always ask for full working example!
    Sorry for this

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

    Re: Calculate angles and distances from XYZ-points

    First I calculate the distance between A-B, B-C and C-A by using SQRT and the 3 YXZ-points. The angle of A(center point) = ARCCOS((B^2-A^2-C^2) / 2*A*C ) Not sure if this is correct and for the angle I don’t need any more the z-point, right?
    I'm not sure if it is right either, because I can't quite picture the triangle you are using for this derivation.

    If B is the right angle in the triangle, and A is the center point, that makes C the point of interest (P1, for example). The line A-C is the hypotenuse of the right triangle, and line A-B and B-C are the legs of the triangle. line AB is the leg adjacent to A, and B-C is the leg opposite A. From the definition of sine, sin(A)=BC/AC (opposite over hypotenuse). The other basic trig functions are defined similarly (http://en.wikipedia.org/wiki/Trigonometric_functions ). Given the length/distances BC and AC, the angle A can be found from ASIN(BC/AC). Note that in Excel (like most programming languages) angles are in terms of radians rather than degrees.

  11. #11
    Registered User
    Join Date
    07-14-2013
    Location
    N/A
    MS-Off Ver
    Excel 2021 - 64 bit on Win11
    Posts
    42

    Re: Calculate angles and distances from XYZ-points

    Thank you very much MrShorty for the info, we will now study all your info!

  12. #12
    Registered User
    Join Date
    07-14-2013
    Location
    N/A
    MS-Off Ver
    Excel 2021 - 64 bit on Win11
    Posts
    42

    Re: Calculate angles and distances from XYZ-points

    Dear forum users, if you like this thread, here you can find complete file from by Alphamax

+ 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. Using google to calculate distances… in a macro
    By fosters_ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-15-2014, 03:37 PM
  2. Replies: 1
    Last Post: 05-14-2014, 10:13 PM
  3. Replies: 16
    Last Post: 05-28-2012, 05:50 AM
  4. Replies: 1
    Last Post: 12-15-2011, 10:42 PM
  5. 10 X 10 grid and finding distances from multiple points...
    By brya6347 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-16-2005, 05:38 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