|
Boost : |
From: Hubert Holin (Hubert.Holin_at_[hidden])
Date: 2006-07-17 12:29:04
Andy Little <andy <at> servocomm.freeserve.co.uk> writes:
>
>
> "Hubert Holin" wrote
> > Janek Kozicki <janek_listy <at> wp.pl> writes:
>
Paris (U.E.), le 17/07/2006
Bonjour
> >> Following functions would be needed:
> >>
> >> operator*(vector<3,T1>,quaternion<T2>) // most important
> >> from_rotation_matrix(matrix<3,3,T>)
> >> to_rotation_matrix()
> >> from_axis_angle(vector<3,T1> axis, T2 angle)
> >> to_axis_angle()
> >> to_euler_angles()
> >>
> >> and few others. Similar functionality is already in boost vault:
> >> directory "Math - Numerics", file Quaternion.h
> >>
> >> Without quaternion rotations this linear algebra library would be pretty
> >> useless for me, so I hope it'll be there :)
> >>
> >
> > Paris (U.E.), le 13/07/2006
> >
> > Bonjour
> >
> > If there is a reasonably standard (algebra, geometry) library to
> > interface
> > the quaternions with, I will provide the necessary functions.
[SNIP]
> Is there any chance of writing some sort of quaternions for dummies
> documentation?
> Basically I am the dummy when it comes to maths , unless I have some job to
> perform like getting point x and rotating it about axis a through angle b.
> Unfortunately the higher level stuff is putting the quaternion library out of
> my reach. I think my only use for quaternions is for rotation. My basic use
> case (maybe like Janek) would be
>
> 1) some way to construct the quaternion from (say) an axis angle
> representation of the rotation
> 2) some way to apply it to a 3D point.
>
> I hope that I could then make use of the library without needing to know all
> the maths.
I am willing to build the bridges, but there has to bee something at the
end of the bridge :-) ! There are geometry-oriented C++ libraries outside Boost,
but none within, despite several proposals to develop such over the last few
years. Basicaly, that's why I included some example code to show how quaternions
could be plugged into rotation matrices, but no formal, part-of-the-library
component.
I would of course welcome the inclusion of geometry-oriented libraries
within Boost (and I truly believe there is an actual need for them).
I should add this is not a symptom of NIH, it is just that one has to
learn a library to interface with it, and this does take time. There is no much
point in spending that time for libraries whose future is at the whim of some
brainless corporation, or depends upon only the long-term interest and
availability of academia (as, sadly, these later usualy highly interesting
libraries have a nasty habit of dying after a few years at most).
> BTW my plan is also to make a quaternion that is compatible with my Quan
> library:
>
> http://quan.sourceforge.net/index.html
>
> I did some test on complex quantities in a previous incarnation of Quan and
> there seemed to be no problems, so for instance one could do
>
> typedef complex<resistance> impedance;
> complex<voltage> v;
> complex<current> i
>
> impedance z = v / i;
>
> This is of course an entirely practical example.
In a similar vein, it would be fun to do simulations using the
quaternionic version of Maxwell's equations.
> I guess that the same thing could be applied in 3D, though I don't know if
> there is such a practical use, though there may well be.
My first reason to look at quaternions was to solve a 3D problem
(interpolation of orientations under constraints). So yes, there is immense
practical use in that field as well.
> Anyway these are the sorts of things I would like to try to do with a
> quaternion.
>
> regards
> Andy Little
Merci
Hubert Holin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk