Boost logo

Boost :

From: Jeremy Pack (rostovpack_at_[hidden])
Date: 2007-03-06 16:35:42


With matrices and vectors that small that are not resizeable at runtime, I
doubt it would need to use Boost Fusion in order to be optimized - templates
would only be necessary to make it work the same for floats, doubles or
other custom user classes. It would, however, be useful to provide a choice
between fast or accurate algorithms, because of the instability of some of
the conversions (Euler angles again...).

I definitely agree with your point on the difficulties of Euler angles. I've
been bitten by that a number of times.

Degrees and Radians would probably be best handled by a more generic units
library. Either way, designing classes and conversions for them is rather
trivial.

The main difficulty would be finding the best formulas for the "accurate"
function implementations.

Jeremy Pack

On 3/6/07, Michael Marcin <mmarcin_at_[hidden]> wrote:
>
> Jeremy Pack wrote:
> > If it is geared towards 3D development, it probably ought to provide
> > conversions to and from the various constructs used for 3D
> > transformations (things like rotation matrices, Euler angles etc.).
> > Without that, I think it will just be duplicating functionality
> > already in Boost, just with a different API.
> >
> > How hard would it be to make the Boost Quaternion classes work with
> > the Matrix classes in Ublas?
> >
>
> Even the Ublas documents recommend not using it for small fixed sized
> vectors and matrices.
> It recommends tvmet.
>
> What I need is a library with:
>
> all types parameterized on a value_type
> all or most operations optionally customizeable for efficiency or
> precision
> concerns
> conversion between types with different value_types
> 2, 3 and 4 component vector and point classes
> 2x2, 3x3, 3x4, 4x4 matrix classes
> an euler paramaters class (normalized quaternions)
> euler angles with clear semantics (preferably definable discussed in P.S.
> below)
> degrees and radians classes (i also need to define another similar type
> myself and use it with the rest of the system)
> trig functions to work with the degrees and radians types
> cross and dot products for 3 component vectors
> conversions between euler angles, euler parameters, and matrix
> representations
> transformation concatenation
> vector transformations
> an optimized implementation using all the tricks of Boost.Fusion and
> generic
> programming in general
> a drop-in replacement unoptimized naive implementation to ease debugging
> and
> give a fallback for non-conforming compilers
> a Boost compatible license
>
> This is just off the top of my head but I think it's enough to show that
> many libraries cover some of my needs but no existing library I have found
> can cover all of them.
>
> P.S.
> Euler angles are the bain of my existence when writing math libraries and
> reading reference material or other people's code.
> The semantics or almost never clearly defined enough. If possible I'd
> like
> any euler angles tuple to have the following configurable with details
> documented.
>
> First [yaw | pitch | roll] is applied as a [counter-clockwise | clockwise]
> rotation around the [positive | negative] [x | y | z] axis.
> Then [yaw | pitch | roll] is applied as a [counter-clockwise | clockwise]
> rotation around the [positive | negative] [x | y | z] axis.
> Finally [yaw | pitch | roll] is applied as a [counter-clockwise |
> clockwise]
> rotation around the [positive | negative] [x | y | z] axis.
>
> - Michael Marcin
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk