Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   BafflinTransform (http://www.velocityreviews.com/forums/t952982-bafflintransform.html)

bob smith 10-03-2012 02:58 PM

BafflinTransform
 
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?

markspace 10-03-2012 03:45 PM

Re: BafflinTransform
 
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.



Lew 10-03-2012 05:41 PM

Re: BafflinTransform
 
markspace wrote:
> bob smith wrote:
>> Am I the only one who gets incredibly confused by AffineTransform?


No, but that isn't necessarily a reflection on the class.

>> I never know when to preConcatenate or concatenate. Then I try both
>> possibilities, and a lot of times neither one produces my desired
>> result.


http://sscce.org/

"Hey, doctor, I keep trying to get healthy. I've tried medicine and I've tried
exercise, and neither one produces my desired result."

>> Any tips?


Ask smarter questions.

> 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.


So show us what you're trying to accomplish, what you've written as an SSCCE, and
what precisely, with copied and pasted output, what differs from your precise
expectations.

--
Lew

Gene Wirchenko 10-03-2012 05:51 PM

Re: BafflinTransform
 
On Wed, 3 Oct 2012 10:41:15 -0700 (PDT), Lew <lewbloch@gmail.com>
wrote:

>markspace wrote:
>> bob smith wrote:
>>> Am I the only one who gets incredibly confused by AffineTransform?

>
>No, but that isn't necessarily a reflection on the class.
>
>>> I never know when to preConcatenate or concatenate. Then I try both
>>> possibilities, and a lot of times neither one produces my desired
>>> result.

>
>http://sscce.org/
>
>"Hey, doctor, I keep trying to get healthy. I've tried medicine and I've tried
>exercise, and neither one produces my desired result."
>
>>> Any tips?

>
>Ask smarter questions.


Besides SSCCE, there is
http://www.catb.org/~esr/faqs/smart-questions.html
How To Ask Questions The Smart Way
by Eric Steven Raymond
It discusses at length how to properly ask technical questions.

The main benefit of following it is that people will have more,
relevant details and stand a better chance of knowing what you are
discussing and what might be done about.

A quieter, but more powerful benefit, is that to ask a technical
question properly, you have to think about your problem in a
structured manner, and often, this can lead to you being able to solve
the problem yourself.

[snip]

Sincerely,

Gene Wirchenko

Jeff Higgins 10-03-2012 07:15 PM

Re: BafflinTransform
 
On 10/03/2012 10:58 AM, bob smith wrote:
> Am I the only one who gets incredibly confused by AffineTransform?


According to the docs:
concatenate [this] = [this] x [Tx]
preconcatenate [this] = [Tx] x [this]

>
> 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?



Lew 10-03-2012 07:49 PM

Re: BafflinTransform
 
Jeff Higgins wrote:
> bob smith wrote:
>> Am I the only one who gets incredibly confused by AffineTransform?

>
> According to the docs:
> concatenate [this] = [this] x [Tx]


<http://docs.oracle.com/javase/7/docs/api/java/awt/geom/AffineTransform.html#concatenate(java.awt.geom.Aff ineTransform)>

> preconcatenate [this] = [Tx] x [this]


<http://docs.oracle.com/javase/7/docs/api/java/awt/geom/AffineTransform.html#preConcatenate(java.awt.geom. 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.


If neither produces the desired result, then it isn't the choice of method that is the problem.

>> Any tips?


--
Lew
Build a man a fire and you warm him for an hour.
Set a man on fire and you warm him for the rest of his life.

Roedy Green 10-03-2012 11:01 PM

Re: BafflinTransform
 
On Wed, 3 Oct 2012 07:58:04 -0700 (PDT), bob smith
<bob@coolfone.comze.com> wrote, quoted or indirectly quoted someone
who said :

>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?


see http://mindprod.com/jgloss/affinetransform.html

It has been a while since I wrote it, but it might help.
--
Roedy Green Canadian Mind Products http://mindprod.com
The iPhone 5 is a low end Rolex.



Arne Vajh°j 10-04-2012 01:36 AM

Re: BafflinTransform
 
On 10/3/2012 1:41 PM, Lew wrote:
> markspace wrote:
>> bob smith wrote:
>>> Am I the only one who gets incredibly confused by AffineTransform?

>
> No, but that isn't necessarily a reflection on the class.
>
>>> I never know when to preConcatenate or concatenate. Then I try both
>>> possibilities, and a lot of times neither one produces my desired
>>> result.

>
> http://sscce.org/
>
> "Hey, doctor, I keep trying to get healthy. I've tried medicine and I've tried
> exercise, and neither one produces my desired result."
>
>>> Any tips?

>
> Ask smarter questions.
>
>> 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.

>
> So show us what you're trying to accomplish, what you've written as an SSCCE, and
> what precisely, with copied and pasted output, what differs from your precise
> expectations.


Hm.

If the original poster has a limited number of specific
problems, then producing a SSCCE is a very good thing.

But I don't see any indications of that.

To me it seems as if the original poster in general find
it difficult to understand how to get it right (besides trial
and error).

It is not a SSCCE'able problem, because it is not about
specific code.

Instead it is about concepts and principles.

Arne




Gene Wirchenko 10-04-2012 04:49 AM

Re: BafflinTransform
 
On Wed, 03 Oct 2012 21:36:38 -0400, Arne Vajh°j <arne@vajhoej.dk>
wrote:

[snip]

>Hm.
>
>If the original poster has a limited number of specific
>problems, then producing a SSCCE is a very good thing.
>
>But I don't see any indications of that.
>
>To me it seems as if the original poster in general find
>it difficult to understand how to get it right (besides trial
>and error).
>
>It is not a SSCCE'able problem, because it is not about
>specific code.
>
>Instead it is about concepts and principles.


It is still SSCCE, just not in code.

Sincerely,

Gene Wirchenko

Jeff Higgins 10-04-2012 07:26 AM

Re: BafflinTransform
 
On 10/03/2012 09:36 PM, Arne Vajh°j wrote:
>>> bob smith wrote:



> Hm.
>
> If the original poster has a limited number of specific
> problems, then producing a SSCCE is a very good thing.
>
> But I don't see any indications of that.
>
> To me it seems as if the original poster in general find
> it difficult to understand how to get it right (besides trial
> and error).
>


To me it seems rather the bob is conducting a poll or troll.
>>>> Am I the only one who gets incredibly confused by AffineTransform?


> It is not a SSCCE'able problem, because it is not about
> specific code.
>
> Instead it is about concepts and principles.
>
> Arne
>
>
>




All times are GMT. The time now is 06:39 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.