Boost logo

Boost :

From: Hervé Brönnimann (hervebronnimann_at_[hidden])
Date: 2007-03-07 22:02:54


I'm always amazed that this discussion comes up from time to time and
no one mentions cgal (www.cgal.org) which has a lot of the
functionality (although 3D transformations could perhaps be improved,
you can do it by extending the framework).

In addition to kernel objects (2D, 3D, and d-dimensional for any d),
incl. usual objects and transformation hierarchy, and predicates /
constructions / intersections / distance computations, it has a bunch
of data structure and algorithms such as convex hulls, minimum encl.
boxes and ellipsoids, interpolation, triangulations and meshes,
whatnot. It is *huge* and if not complete, much more so than
anything you would write from scratch. It's also very easy to screw
those functions, such as distance between two segments in 3D. Just
try, and then you'll appreciate how much cgal can do for you.

Their transformation hierarchy is excellent, storing only a single
float/double for a scaling transformation from the origin, or three
float/doubles for a translation, e.g., and allowing either Cartesian
or homogeneous coordinates. It would be much more efficient to
design an interface for quaternion / Euler angles / yaw/pitch/roll on
top of the 3D transformation hierarchy, and the folks at cgal would
not only love you but perhaps integrate your contribution into their
releases. (Making no promises, I'm not involved with this project any
more...)

Go take a look at www.cgal.org and send msgs to their devel mailing
list for any questions. Good luck with your projects regardless if
you do or not!

--
Herve
On Mar 6, 2007, at 3:07 PM, Michael Marcin 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