+ Reply to Thread
Results 1 to 3 of 3

Calculating Rotation of a Displaced Plane with Respect to its Starting Position

  1. #1
    Registered User
    Join Date
    01-28-2010
    Location
    Bristol, England
    MS-Off Ver
    Excel 2007
    Posts
    15

    Calculating Rotation of a Displaced Plane with Respect to its Starting Position

    Hi all,

    I have a rigid body that is rotated by an unknown amount. All the data I have is four points where the plane started and four points where it ends up (displaced). From this data, my approach has been to find the normal vectors of the planes and then describe the rotation using quaternions. The angle part is derived as the dot product between the two normalised vectors and the vector part as the cross product between them.

    I've tried to then use a few various methods in order to rotate my original points back to the displaced points, .e.g. P' = qPq' and creating rotation matrices. Whilst I can manage to get this to work for simple cases, like rotating by 90 degrees around Y or X, I cannot get them to work for cases where the the rotation is about the Z axis (presumably because the two normal vectors are parallel) or cases where there are a number of rotations around a different axes. I've been studying quaternions, rotations and working on this all weekend and I feel like I've just hit a brick wall here. Any insight would be much appreciated.

    I've uploaded my messy spreadsheet where I've been playing around with different methods. By the way, the points and 'rotated' points I have generated using a CAD program.

    If anyone is wondering about where I've tried using LINEST, it's because eventually my 'displaced' points won't make a perfect plane and I will have to somehow estimate a plane from them.

    Cheers


    EDIT

    The above question is somewhat out of date, please see below:

    I've now attached my latest spreadsheet. I've discovered that in fact, I need to rotate by using two quaternions rather than just one. The method I'm trying to follow is detailed on this page: https://stackoverflow.com/questions/...99768#47499768 - however it is in some programming language and although I'm trying my best to interpret it and write similar formulas in excel, I'm still not getting the correct answers. I'm not sure if I'm calculating the quaternions correctly, or if I have to use ACOS in the w part and then convert to degrees (although I've tried this also and didn't get the correct answer).
    Attached Files Attached Files
    Last edited by Mawhood; 11-26-2017 at 04:02 PM. Reason: Uploading document

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,865

    Re: Calculating Rotation of a Displaced Plane with Respect to its Starting Position

    Attach your workbook here. Many members will not or cannot access file-sharing sites.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    01-28-2010
    Location
    Bristol, England
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Calculating Rotation of a Displaced Plane with Respect to its Starting Position

    Attached my spreadsheet

+ 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 figure out substring starting position (if multiple occurrences)
    By niuyuer in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-08-2016, 01:23 PM
  2. [SOLVED] Calculating discount amount with respect to hierarchy of additional discounts
    By acellis9 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-03-2014, 08:40 PM
  3. Set scrollbars to a default starting position when a userform is initialized
    By Big_E in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-27-2014, 02:30 AM
  4. VBA Userform code and starting position
    By baltic in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-22-2014, 07:38 PM
  5. Replies: 6
    Last Post: 01-27-2013, 09:29 AM
  6. [SOLVED] Calculating sales with respect to item and in a particular month
    By peaceracer in forum Excel General
    Replies: 12
    Last Post: 07-19-2012, 03:23 AM
  7. [SOLVED] Calculating the plane of a physical object
    By ThadZGrey in forum Excel General
    Replies: 22
    Last Post: 05-11-2012, 12:39 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