Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #19114

Re: BafflinTransform

From "John B. Matthews" <nospam@nospam.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: BafflinTransform
Date 2012-10-04 21:23 -0400
Organization The Wasteland
Message-ID <nospam-E6C67B.21230604102012@news.aioe.org> (permalink)
References (1 earlier) <k4hmjn$c5t$1@dont-email.me> <e69f5245-a51f-4547-9837-22f23ca838f2@googlegroups.com> <fder68l1c0etqevoaigdb3f09l4rp222l1@4ax.com> <nospam-E2F47C.13581304102012@news.aioe.org> <k4kldp$g1q$1@dont-email.me>

Show all headers | View raw


In article <k4kldp$g1q$1@dont-email.me>, markspace <-@.> wrote:

> On 10/4/2012 10:58 AM, John B. Matthews wrote:
> 
>  > In article <fder68l1c0etqevoaigdb3f09l4rp222l1@4ax.com>,
> >>
> >>       Matrix multiplication is NOT commutative.
> >>
> > Absolutely correct, as well as pithy. Conceptually, it may help
> > to think of a series of (post-) concatenated transformations as
> > having been applied in a last-specified-first-applied order.
> 

> Another rule of thumb is that scaling and rotating tend to occur 
> around the origin, not the translation point.  So if you scale or 
> rotate an already-translated AffinceTransform, you might get 
> unintended results.

Agree.
 
> The method I'm used to from 3D graphics is to translate any objects 
> back to the origin, scale and rotate, then translate them back to 
> their original/intended point in space.  It's a literal three step 
> process; you can't put all that together in one matrix.

Why not? Isn't that what a method like the anchored rotate() below does? 
When it returns, the enclosing transform contains a single matrix that 
does all three things when applied to a graphics context or used to 
create a transformed Shape.

  public void rotate(double theta, double anchorx, double anchory) {
    translate(anchorx, anchory);
    rotate(theta);
    translate(-anchorx, -anchory);
  }

> Given that AffineTransforms are 2D transforms, some results might be 
> different than the 3D equivalents.  Like I said, some math might be 
> involved here.

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

BafflinTransform bob smith <bob@coolfone.comze.com> - 2012-10-03 07:58 -0700
  Re: BafflinTransform markspace <-@.> - 2012-10-03 08:45 -0700
    Re: BafflinTransform Lew <lewbloch@gmail.com> - 2012-10-03 10:41 -0700
      Re: BafflinTransform Gene Wirchenko <genew@ocis.net> - 2012-10-03 10:51 -0700
      Re: BafflinTransform Arne Vajhøj <arne@vajhoej.dk> - 2012-10-03 21:36 -0400
        Re: BafflinTransform Gene Wirchenko <genew@ocis.net> - 2012-10-03 21:49 -0700
        Re: BafflinTransform Jeff Higgins <jeff@invalid.invalid> - 2012-10-04 03:26 -0400
          Re: BafflinTransform Gene Wirchenko <genew@ocis.net> - 2012-10-04 09:30 -0700
          Re: BafflinTransform Arne Vajhøj <arne@vajhoej.dk> - 2012-10-04 17:38 -0400
            Re: BafflinTransform Jeff Higgins <jeff@invalid.invalid> - 2012-10-05 03:00 -0400
              Re: BafflinTransform Arne Vajhøj <arne@vajhoej.dk> - 2012-10-05 22:02 -0400
        Re: BafflinTransform Lew <lewbloch@gmail.com> - 2012-10-04 12:05 -0700
    Re: BafflinTransform bob smith <bob@coolfone.comze.com> - 2012-10-04 07:22 -0700
      Re: BafflinTransform Gene Wirchenko <genew@ocis.net> - 2012-10-04 09:35 -0700
        Re: BafflinTransform "John B. Matthews" <nospam@nospam.invalid> - 2012-10-04 13:58 -0400
          Re: BafflinTransform markspace <-@.> - 2012-10-04 11:44 -0700
            Re: BafflinTransform "John B. Matthews" <nospam@nospam.invalid> - 2012-10-04 21:23 -0400
              Re: BafflinTransform markspace <-@.> - 2012-10-04 19:27 -0700
                Re: BafflinTransform Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-10-04 19:55 -0700
                Re: BafflinTransform Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-10-04 23:33 -0400
            Re: BafflinTransform Gene Wirchenko <genew@ocis.net> - 2012-10-05 09:04 -0700
              Re: BafflinTransform markspace <-@.> - 2012-10-05 09:34 -0700
                Re: BafflinTransform Gene Wirchenko <genew@ocis.net> - 2012-10-05 12:58 -0700
                Re: BafflinTransform markspace <-@.> - 2012-10-05 17:15 -0700
          Re: BafflinTransform Gene Wirchenko <genew@ocis.net> - 2012-10-04 13:51 -0700
  Re: BafflinTransform Jeff Higgins <jeff@invalid.invalid> - 2012-10-03 15:15 -0400
    Re: BafflinTransform Lew <lewbloch@gmail.com> - 2012-10-03 12:49 -0700
  Re: BafflinTransform Roedy Green <see_website@mindprod.com.invalid> - 2012-10-03 16:01 -0700

csiph-web