
Geometry : 
Subject: Re: [geometry] translation and rotation proposal
From: Andrew Hundt (athundt_at_[hidden])
Date: 20130528 21:23:10
I recommend taking a look at how eigen does things for ideas before any
major design decisions, and consider the possibility of directly
integrating with ublas as well once you start getting into real matrix
operations.
You may also want to have a pose object that defines the relative position
and orientation of the object in space, for both 2D and 3D. This is closely
related to a transform but in many cases more useful/easier to use. Given
an object with one pose you can simply provide a function with the object,
pose and the new desired pose, rather than having to construct a transform
from one to the other. Of course this is not exclusive to the transform
functions, and they should exist as well.
https://en.wikipedia.org/wiki/Pose_(computer_vision)
Cheers!
Andrew Hundt
On Tue, May 28, 2013 at 7:26 PM, Adam Wulkiewicz
<adam.wulkiewicz_at_[hidden]>wrote:
> Hi,
>
>
> Adam Wulkiewicz wrote:
>
>> Hi,
>>
>> I've been thinking about additional concepts like vector, matrix, etc.
>> and how they could be used in Boost.Geometry. In our context they
>> probably should be seen only as translation and rotation representations.
>>
>> So I think about following use cases:
>>
>>
> /.../
>
> In the free time you may check extensions/algebra. For now there is only
> Vector concept and some algorithms (for now only for vectors defined in
> cartesian cs). Basically this is what is implemented now:
>
> typedef bg::model::point<
> double, 3, ::boost::geometry::cs::**cartesian> p3d;
> typedef bg::model::box<p3d> b3d;
> typedef ag::model::vector<double, 3> v3d;
>
> v3d v;
> bg::set<0>(v, 1);
> bg::set<1>(v, 2);
> bg::set<3>(v, 3);
> double x = bg::get<0>(v);
> double y = bg::get<1>(v);
> double z = bg::get<2>(v);
>
> bg::assign_values(v, 10, 11, 12);
> bg::assign_zero(v);
>
> // get vector
> p3d p1, p2;
> bg::translation(p1, p2, v);
> v = bg::return_translation<v3d>(**p1, p2);
>
> // translate point
> bg::translate(p1, v);
> bg::translated(p1, v, p2);
> p2 = bg::return_translated<p3d>(p1, v);
>
> // translate box
> b3d b1, b2;
> bg::translate(b1, v);
> bg::translated(b1, v, b2);
> b2 = bg::return_translated<b3d>(b1, v);
>
> I was probably too hasty with the rotation proposal and must think more
> about it.
>
> Another thing, if we have transformations in the future, it would probably
> be good to replace translate() and rotate() with one transform() function
> working for vectors, rotation and transformation matrices, quaternions, etc.
> And then replace translation() by some more general name like
> vector_between().
>
>
> Regards,
> Adam
> ______________________________**_________________
> Geometry mailing list
> Geometry_at_[hidden]
> http://lists.boost.org/**mailman/listinfo.cgi/geometry
>
Geometry list run by mateusz at loskot.net