+ Reply to Thread
Results 1 to 7 of 7

components of the angle between a line and a plane

  1. #1
    Registered User
    Join Date
    03-31-2019
    Location
    Pittsfield MA
    MS-Off Ver
    2007
    Posts
    14

    components of the angle between a line and a plane

    I have a 3D point at: pX1 pY1 pZ1; and a body plane with origin at: bX1, bY1, bZ1, with rotations roll pitch yaw.
    I also have the 3x3 transformation matrix of this plane: Rot[0] Rot[1] Rot[2] Rot[3] Rot[4] Rot[5] Rot[6] Rot[7] Rot[8]
    Point coordinates are in Sheet 1: C12, D12, E12.
    Plane coordinates are in Sheet 2: C12, D12, E12,
    plane rotations are in Sheet 2: F12 G12 H12
    plane rotations are in Sheet 2: J12 K12 L12 M12 N12 O12 P12 Q12 R12.

    I want to compute the angle between: the line from my 3D point to the body origin (pX1 pY1 pZ1 to bX1, bY1, bZ1); and the body plane.
    Furthermore and importantly, I need the components of this angle, and not just the magnitude of the resultant.
    In my thinking the body plane has a right handed Local Coordinate System with X to the right, Y anterior with both X&Y on the body plane, with Z normal to the body plane.
    In this way I want to find the XZ angle and the YZ angle, or maybe it is simpler to say the X and Y angles.
    From 18 points of data I wish to compute 2 angles relative to the body plane LCS.
    I hope that my question is clear, let me know. Thanks!
    I did ask this question today on:
    stack overflow /questions 2d-angle-components-between-a-plane-and-a-point
    reddit r/mathematics/ finding_the_2d_angle_components_of_the
    Last edited by masterjebbi; 03-31-2019 at 06:47 PM. Reason: adding cross posted requests

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

    Re: components of the angle between a line and a plane

    Assuming I found the correct stackoverflow post (https://stackoverflow.com/questions/...=SearchResults ) I will agree with the other respondent -- if this is more math/geometry/linear algebra than Excel, you might inquire with more mathematically inclined folks. We are usually pretty good at the Excel side of these questions if someone can explain the math/geometry/linear algebra of the question.

    For the linear algebra (vectors and dot products and such) approach, I put "how to compute vector from plane to point" into my favorite search engine and found a couple of hopefully helpful tutorials:
    https://mathinsight.org/distance_point_plane
    http://geomalgorithms.com/a04-_planes.html
    I'm sure there are others.
    I'm not sure I know exactly what components you need, but part of the question could end up being about converting between spherical coordinates and Cartesian coordinates. Something like this may help: http://tutorial.math.lamar.edu/Class...calCoords.aspx
    A couple of Excel specific notes: dot products are SUMPRODUCTS() and remember that, like all other programming languages, Excel does trigonometry in radians (so if you want to work in degrees, make sure you recall to convert back and forth between angular units).
    I haven't taken the time to really research this to remember how this sort of thing is done. If you help us understand what you already understand and the parts that you need help with, we should be able to help you. I think we have a few here with enough linear algebra knowledge to help, if you give us enough to work with to refresh our rusty math.
    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
    03-31-2019
    Location
    Pittsfield MA
    MS-Off Ver
    2007
    Posts
    14

    Re: components of the angle between a line and a plane

    Thank you, I agree that I must be closer with the math before putting it out to get help on the coding.
    I have been working from this method, but I am unhappy with it because it calculates a single resultant angle. I need the 2D angle relative to the plane as I see it.

    www vitutor.com/geometry/distance/line_plane

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

    Re: components of the angle between a line and a plane

    I'm having trouble visualizing the geometry of your main problem. If I understand how the vitutor tutorial applies, it almost seems like it should be as simple as taking their u vector, which they have described in Cartesian coordinates, and converting those Cartesian coordinates to spherical coordinates (r,theta,phi). Follow link to the tutorial in my previous post.
    Is there something I am missing in the geometry? Are there questions about identifying/calculating the u vector coordinates?

  5. #5
    Registered User
    Join Date
    03-31-2019
    Location
    Pittsfield MA
    MS-Off Ver
    2007
    Posts
    14

    Re: components of the angle between a line and a plane

    I believe that if I transform my 3D point coordinate from the GCS into the Local Coordinate System of my plane, it will be easier to do simple trigonometry between the transformed coordinate and the reference plane.
    I found the method in Stack Exchange Mathematics.
    math.stackexchange.com/questions/2860704/point-in-coordinate-system-a-how-to-find-its-location-in-coordinate-system-b

    As suggested I will first shift the point into the LCS:

    First send the point from CGS to the LCS origin.


    This is simple subtraction of the GCS coordinate components and the body origin location in the GCS.

    Can you Excel experts help me on how to then rotate the vector using the inverse of quaternion q ?

    If quaternion is of unit length I will use the conjugate inplace of the inverse.

    Then I can send the rotated vector to reference frame ��
    Last edited by masterjebbi; 04-01-2019 at 02:22 PM.

  6. #6
    Registered User
    Join Date
    03-31-2019
    Location
    Pittsfield MA
    MS-Off Ver
    2007
    Posts
    14

    Re: components of the angle between a line and a plane

    example light to plane 1.jpg I hope this picture helps. I am measuring how light strikes a plane, and I can measure that as two angles with orthogonally placed sensors along the x' and y' body coordinate system. This is why I need the individual angles of the resultant light strike.
    Last edited by masterjebbi; 04-01-2019 at 02:24 PM.

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

    Re: components of the angle between a line and a plane

    I'm sure we can help with programming the desired operation involving the quaternions and vectors and whatever else is involved. Again, how much of this is the basic math/computation steps, and how much is specific to Excel. If I am going to help here, I will need a refresher on the exact matrix operations that are needed for this. I will probably inquire around and see if some of those who have been knowledgeable about these linear algebra topics in the past can chime in.

    To my knowledge, Excel does not have a lot of built in functions for dealing with these higher math concepts. Excel has a few basic matrix functions (MMULT(), TRANSPOSE(), MINVERSE() and maybe a few others) for dealing with basic matrix operations. Things like dot products can be computed using a SUMPRODUCT() function. Most other matrix/vector operations would need to be built from the ground up. You can see the available built in functions here (most matrix functions are under math or engineering https://support.office.com/en-us/art...1-63f26a86c0eb ).

    If you are still looking for help with the math side of the problem, Wikipedia has a good page here: https://support.office.com/en-us/art...1-63f26a86c0eb I did not spend a lot of time trying to digest it all. I did not see anything that obviously fits easily in Excel's built in matrix operations, so I expect there will be some basic programming to get the matrix/vector operations correct, but once those are programmed in, they should work well.

    Have you put some key words like "quaternion rotation" or similar into this site's search engine? I want to say that I have seen a few previous discussions about using quaternions before.

+ 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. Replies: 6
    Last Post: 09-30-2016, 10:32 AM
  2. Angle of Line Chart
    By treva26 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-22-2014, 03:11 AM
  3. [SOLVED] Angle of view & Centre line
    By WCE_123 in forum Excel General
    Replies: 6
    Last Post: 03-04-2014, 10:39 AM
  4. [SOLVED] Get Point intersection between vertical plane ('ZY') and 3d line
    By thomasaxn in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-28-2012, 09:41 AM
  5. Replies: 4
    Last Post: 09-03-2012, 06:53 PM
  6. [SOLVED] Return the angle of a drawn line
    By Robert Tosh in forum Excel General
    Replies: 0
    Last Post: 03-10-2006, 11:00 PM
  7. [SOLVED] How do I get Excel to tell me the angle of a line
    By drbob2000 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-21-2005, 08:05 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