On Thu, Aug 16, 2012 at 12:32 PM, Christopher Wright < christopher_wri...@apple.com> wrote:
> > Is there math that can be done to offset "rotate" the texture correctly? > > > > I think if I could find some decent example code for affine tiling, I > could figure out how to do what I wish to, but google has been lacking in > results so far. > > it's general matrix math. Rotations take place about the origin; > therefore, to rotate about an arbitrary point in 2-space (or axis in > 3-space, or plane in 4-space) you simply translate by the difference, > rotate, and then re-transform (to "put it back"). so you'll have a > translation matrix, a rotation matrix, and a third translation matrix. > Multiply them all together, and you should be good to go. Order of > multiplications matters (it's non-commutative, unlike scalar > multiplication), so do some experiments to find the right order (it's > "backwards" iirc, but I could be forgetting/over-simplifying) > > I'm sure I'm not comprehending something here. So, what if there is no "difference" and the rotation is around origin? There would be no translation matrix needed, it would "just work"? What I'm finding is that Z rotation works fine, but Y and X "stretch"/"pinch" out funny. Or is it that the Z value of the texture matrix the same as the clip point of projection space, and if I translate by that, it would look right(?). > > > Thanks, > > George Toledo > > _______________________________________________ > > Do not post admin requests to the list. They will be ignored. > > Quartzcomposer-dev mailing list (Quartzcomposer-dev@lists.apple.com > ) > > Help/Unsubscribe/Update your Subscription: > > > https://lists.apple.com/mailman/options/quartzcomposer-dev/christopher_wright%40apple.com > > > > This email sent to christopher_wri...@apple.com > > -- > Christopher Wright > christopher_wri...@apple.com > > > >
_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list (Quartzcomposer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com