
Geometry : 
Subject: [ggl] Efficient rotation about a point
From: Barend Gehrels (Barend.Gehrels)
Date: 20091129 16:24:35
Hi Lee, Stephen,
Indeed it is possible to do this with one matrix. GGL does not define
matrix calculations itself, but uses Boost uBlas for matrix calculations.
You can see how this (concatenating matrices) is done, e.g. in
http://geometrylibrary.geodan.nl/formal_review/map__transformer_8hpp_source.html.
Regards, Barend
There are some transformers, but as so
Stephen Leary wrote:
> Nice summary of matrix transformations is available on wikipedia.
>
> Essentially you can do any number of rotates and translates on your
> matrix and then apply the result as a transformation to your
> space/feature. This is generally why matrices get used alot because
> they are a very nice way of storing the transformation history without
> needing to store all the translated points.
>
> Pretty much any linear transformation can be represented by a matrix.
> These matrices can be built up through multiplications of matrices.
> The order you multiply the matrices in matters as few matrices commute
> with others. (Identity and null being the only ones i can think of off
> hand).
>
> I think a set of factories to produce useful matrices would be more
> approprate than extra methods (but that is my opinion)
>
> Thoughts?
>
> Stephen
>
>
>
>
> On Sun, Nov 29, 2009 at 8:11 PM, Stephen Leary <sleary_at_[hidden]
> <mailto:sleary_at_[hidden]>> wrote:
>
> Of course it can. you simply multiple a +translate by a rotate
> then multiply the result by a translate. This gives you the
> matrix you need.
>
> Stephen
>
>
> On Sun, Nov 29, 2009 at 7:27 PM, Lee <lee_at_[hidden]
> <mailto:lee_at_[hidden]>> wrote:
>
> Can a single matrix properly represent
> "translate/rotate/+translate"
>
> ?
> I think the translation component of the matrix would be
> negated resulting in rotation about the origin, losing the
> "rotation about a point" behaviour. No?
>
>
> Stephen Leary wrote:
>
> This is usually acomplished by producing a matrix that
> represents translate/rotate/+translate then applying that
> matrix transform once. I havent checked to see if GGL
> supports matrix transforms but that is how i would
> approach this use case in "real life". The matrix gets
> built once and reused as many times as needed.
>
> Stephen
>
> On Sun, Nov 29, 2009 at 6:43 PM, Lee
> <lee_at_[hidden]
> <mailto:lee_at_[hidden]>
> <mailto:lee_at_[hidden]
> <mailto:lee_at_[hidden]>>> wrote:
>
> Hi,
>
> What is the best way (in terms of efficacy) to rotate a
> ring about
> a point in GGL?
> Looking at GGL it seems right now to require three
> separate passes
> over the point
> data: translate/rotate/+translate. Can't this be done
> in some
> kind of single pass
> 'rotate_about_transformer'?
>
>
> _______________________________________________
> ggl mailing list
> ggl_at_[hidden] <mailto:ggl_at_[hidden]>
> http://lists.osgeo.org/mailman/listinfo/ggl
>
>
>
>
> 
> Stephen Leary
>
>
>
>
> 
> Stephen Leary
> 
>
> _______________________________________________
> ggl mailing list
> ggl_at_[hidden]
> http://lists.osgeo.org/mailman/listinfo/ggl
>
  Barend Gehrels  http://www.erplex.com http://trac.osgeo.org/ggl http://www.geodan.nl  Geodan Holding b.v. President Kennedylaan 1 1079 MB Amsterdam The Netherlands  Tel: +31 (0)20 5711 335 Mob: +31 (0)6 175 447 62 Fax: +31 (0)20 5711 333  Email: barend.gehrels_at_[hidden] Kvknummer: 33 207089 Disclaimer: www.geodan.nl/disclaimer   next part  An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/ggl/attachments/20091129/f2a20500/attachment0001.html
Geometry list run by mateusz at loskot.net