octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #55752] Quaternion Package rot2q.m can't handl


From: Rick T
Subject: [Octave-bug-tracker] [bug #55752] Quaternion Package rot2q.m can't handle multiple inputs but the quaternion constructor can
Date: Wed, 20 Feb 2019 17:01:21 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/71.0.3578.98 Chrome/71.0.3578.98 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?55752>

                 Summary: Quaternion Package rot2q.m can't handle multiple
inputs but the quaternion constructor can
                 Project: GNU Octave
            Submitted by: ratulloch
            Submitted on: Wed 20 Feb 2019 10:01:20 PM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 5.0.91
        Operating System: GNU/Linux

    _______________________________________________________

Details:


The rot2q.m function found in the Quaternion package seems not intended to
handle multiple inputs.  On the other hand the quaternion constructor can
handle multiple inputs.  

Test code that errors with:
 
"error: rot2q: first argument 'axis' must be a length three vector
error: called from
    rot2q at line 74 column 5
    test_quaternion_array_coversion at line 10 column 21" 


clear all
pkg load quaternion
xyz_angle=[0  1  0  1.570796326794897;0.5  1  0  1.570796326794897]
pt_xyz_angle_to_quat=rot2q ([xyz_angle(:,1),xyz_angle(:,2),xyz_angle(:,3)],
xyz_angle(:,4)) 


This is my logic:
1) Convert multiple xyz points in array to quaternions using the function
rot2q
2) Do calculations on multiple points from array in quaternions using the
function quaternion
3) Convert quaternion array data back to xyz points using the function q2rot
4) Plot new xyz points using the function scatter3 


Kai Torben Ohlhus from the Octave list
Recommended some possible changes see attached files of Kai's code
suggestions.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 20 Feb 2019 10:01:20 PM UTC  Name: rot2q_changes.m  Size: 4KiB   By:
ratulloch

<http://savannah.gnu.org/bugs/download.php?file_id=46319>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55752>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]