Boost logo

Boost :

From: Richard Newman (richard_at_[hidden])
Date: 2006-03-21 16:19:57

Andy Little wrote:
> "Geoffrey Irving" <irving_at_[hidden]> wrote in message
> news:20060317182700.GG9842_at_lie.Stanford.EDU...
>>On Fri, Mar 17, 2006 at 03:09:26PM -0300, rodolfo_at_[hidden] wrote:
>>>On Fri, Mar 17, 2006 at 10:17:53AM -0700, Richard Newman wrote:
>>>>Is it reasonable to extend the logic to check for 3D shapes (i.e.,
>>>>spheres instead of circles, etc.)?
>>>>It certainly would be a reasonable strategy to get the 2D work you have
>>>>into the library and treat 3D as a later extension.
> In my own work on this I used two namespaces "geometry::two_d" and
> "geometry::three_d".
> (I shall put what I have in the vault). I or someone could create a Geometry
> folder ...?
> [...]
>>>All coordinates are double. Maybe each primitive should be a template,
>>>like: point_t<double> is a point with double floating point coordinates,
>>>point_t<int> is with integer coordinates, etc.
>>Templatization of the float type is good, and again point_t should probably
>>be a general purpose small vector type.

I'm not at all familiar with the math involved, but I imagine that the
capabilities could be extended for n-dimensionality if the template
types were vectors. Template specializations for 2 and 3-D would assure
  specific performance, but really any geometry type calculations in
n-dimensions would work: intersections of hypercubes and hyperspheres, etc.

I'm sure this is beyond the scope of an inaugural library, but still an
interesting extension. Because of this possibility, I would argue that
vector support (as tuples for the point specifications) is valuable.

Kind regards,
Richard Newman

Boost list run by bdawes at, gregod at, cpdaniel at, john at