Pythagorean Hodograph Curves - Quaternion Representation (Quintics)
.: Pythagorean Hodograph Quintic Curves by Quaternion Representation (PHQCQR) Package :.
The package comprises a library of routine written in C++ to build a PH Quintic. Here you can find C++ methods that can help you to manage:
- basic operation between arrays such as V1+V2, V1-V2, dotProd(V1, V2), crossProd(V1, V2), dirCos(V1), norm(V)
- basic quaternion algebra ( Q+Q, Q*Q, Q-Q, conj(Q), magn(Q))
- constructor to build Spatial Ph Quintic Curves;
- constructor to build General Helical Spatial Ph Quintic Curves;
- constructor to build Spatial Ph Quintic Curves which satisfies Hermite Interpolant Conditions.
The main ideas, behind this code, is use C++ to generate all numerical values related to Spatial Ph Quintic Curve, then read and visualize all datas through Matlab.
The code has been developed using XCode 7.3 and Matlab 2014b on Mac OSX El Capitan 10.11.5 (June 2016).
The code is widely commented and easy to use.
.: Hint :.
To have a better and deeply idea about the function that you can find I suggest you to take a look to the following header files:
- quaternion.hpp
- sptPhQuintic.hpp
- readWriteLib.hpp
.: Coding (Matlab):.
From a programmers' perspective, this example illustrates how to use:
- OOP (https://www.mathworks.com/help/pdf_doc/matlab/matlab_oop.pdf);
- Advance use of plot properties (http://it.mathworks.com/help/matlab/ref/plot.html);
.: Coding (C++):.
From a programmers' perspective, this example illustrates how to use:
- OOP (http://www.cplusplus.com/doc/tutorial/classes/);
- Advance Operator Overloading:
http://www.tutorialspoint.com/cplusplus/cpp_overloading.htm
http://www.learncpp.com/cpp-tutorial/92-overloading-the-arithmetic-operators-using-friend-functions/
- I/O writing on file to produce readable numerical results.
.: References :.
[1] Rida T. Farouki, Pythagorean-Hodograph Curves: Algebra and Geometry Inseparable,
http://www.springer.com/us/book/9783540733973
.: Other :.
If you consider to use this library in your work you are kindly requested to mention this repository in your work.
If you find any kind of error or simply you have some questions, please contact me immediately at: duccio.mugnaini[at]gmail.com
Many thanks in advance,
Duccio Mugnaini.
.: Demo :.
https://www.youtube.com/watch?v=A06aMBZIvzM
.: Quaternions :.
https://www.youtube.com/watch?v=dVCZs7vedWE
Cite As
Duccio Mugnaini (2024). Pythagorean Hodograph Curves - Quaternion Representation (Quintics) (https://www.mathworks.com/matlabcentral/fileexchange/57804-pythagorean-hodograph-curves-quaternion-representation-quintics), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- AI and Statistics > Curve Fitting Toolbox > Interpolation >
- Aerospace and Defense > Aerospace Toolbox > Standard Workflow Procedures > Coordinate Systems > Quaternion Math >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.