On Wednesday, October 3, 2012 10:46:00 AM UTC-5, markspace wrote:
> On 10/3/2012 7:58 AM, bob smith wrote:
>
> > Am I the only one who gets incredibly confused by AffineTransform?
>
> >
>
> > I never know when to preConcatenate or concatenate. Then I try both
>
> > possibilities, and a lot of times neither one produces my desired
>
> > result.
>
> >
>
> > Any tips?
>
>
>
>
>
> I suspect some math is involved. 
>
>
>
>
>
> Seriously, it's matrix algebra, and the formulas are given in each
>
> method description. You need to work out what it is you are actually
>
> doing first. Which you haven't told us, so I'm assuming that's the problem.
It seems like when I want to "tack on" an operation, it is actually a preConcatenate.
This is counterintuitive to me.
Also, when you are just doing commutative operations, like just translation, it doesn't matter whether you preConcatenate or concatenate.
What happened was I started with just translations and was concatenating.
Then, I added rotation, and it did not work right whether I preConcatenated or concatenated. The issue was that I should have been preConcatenating the translations that I had already programmed in.