Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
BafflinTransform
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 26 - 28 of 28 - Collapse all  -  Translate all to Translated (View all originals) < Older 
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Gene Wirchenko  
View profile  
 More options Oct 5 2012, 3:58 pm
Newsgroups: comp.lang.java.programmer
From: Gene Wirchenko <ge...@ocis.net>
Date: Fri, 05 Oct 2012 12:58:37 -0700
Local: Fri, Oct 5 2012 3:58 pm
Subject: Re: BafflinTransform

On Fri, 05 Oct 2012 09:34:33 -0700, markspace <-@.> wrote:

[snip]

>No, really it doesn't work this way.  Note I'm not talking about
>starting with the identity matrix.  I'm talking about starting with an
>object that's already been translated at least once.  You have to add an

     You do not have to.

>extra step to remove the translations back to the origin ("identity") or
>successive multiplications aren't going to work the way you'd expect.

>And I don't think you can "pre-multiply" that out; you'll end up doing
>four, or more, operations instead of three.  In intensive graphics
>applications, that's a no-no.

     Well, you can.  Since matrix multiplication is associative, you
can do so.  Example with right-side transforms:

     Let M be whatever matrix you wish to transform.
     Let M' be the transformed matrix.
     Let T1 be the transform for translation to origin.
     Let T2 be the main transform.
     Let T3 be the transform for translation from origin.

     M' = M X T1 X T2 X T3
is equivalent to
     M' = M X (T1 X T2 X T3)
Now, let Tall = T1 X T2 X T3.  Obviously,
     M' = M X Tall
You can apply Tall to however many matrices as you want, but you need
calculate it only once.

Sincerely,

Gene Wirchenko


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
markspace  
View profile  
 More options Oct 5 2012, 8:15 pm
Newsgroups: comp.lang.java.programmer
From: markspace <-@.>
Date: Fri, 05 Oct 2012 17:15:20 -0700
Local: Fri, Oct 5 2012 8:15 pm
Subject: Re: BafflinTransform
On 10/5/2012 12:58 PM, Gene Wirchenko wrote:

>       Well, you can.  Since matrix multiplication is associative, you
> can do so.  Example with right-side transforms:

Since the translation part has to happen first and last, I don't think
this helps.  Association isn't the issue, it's commutation.

  F = T1 x S x A x T2

A is constant, S (start) is your input, T1 translates back to the
origin, and T2 translates back. F is the final output.  T1 and T2 are
"variable" in that they are related to S and will be different for each
pass.  I think T2 = the total translation on the S object, and T1 =
1/T2, but I haven't double checked/proved that mathematically.

If you try to combine A x T2, you don't save any work, because it still
has to be done once per S rotated.

I've seen this formula a lot in many books, and if there were a way to
simplify it, I'm sure someone would have by now.  Plus, math.

Let me try to give a quick example.  We have a shape which looks like
the letter X, which we want to rotate 45 degrees counter clockwise about
it's own center, so we are looking at an X that is slightly heeled over.
  The X is currently at position (1,2), so if we just applied a
rotation, we'd actually rotate the (1,2) about the origin we don't want
that.

^
|
|. . .X
|     .
|------------->

To do this we must translate back to the origin, apply the transform,
and then translation back to (1,2).  Now imagine we have several hundred
other shapes to rotate/scale the same way.  I think that makes clear the
operation I'm talking about.  Many shapes all with a *local* transform
which need to be applied, most not at the origin.  I don't think you can
reduce that formula in the general case.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arne Vajhøj  
View profile  
 More options Oct 5 2012, 10:02 pm
Newsgroups: comp.lang.java.programmer
From: Arne Vajhøj <a...@vajhoej.dk>
Date: Fri, 05 Oct 2012 22:02:30 -0400
Local: Fri, Oct 5 2012 10:02 pm
Subject: Re: BafflinTransform
On 10/5/2012 3:00 AM, Jeff Higgins wrote:

> On 10/04/2012 05:38 PM, Arne Vajhøj wrote:
>> On 10/4/2012 3:26 AM, Jeff Higgins wrote:
>>> To me it seems rather the bob is conducting a poll or troll.

>> Why?
> I don't know. It is just the way it read to me.

>> Problems understanding that stuff is pretty common.
> Yep. The original post didn't seem a sincere request for
> enlightenment despite the final, "Any tips?".

You may be right.

But I am willing to give the guy the benefit of
doubt.

Arne


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages < Older 
« Back to Discussions « Newer topic     Older topic »