Re: Trouble deriving values from a matrix
- From: David Stiller <davestiller@xxxxxxxxx>
- Date: Thu, 6 Dec 2007 12:05:59 -0800 (PST)
Okay, the more I study this, the more I see what a royal mess
I've made of the whole thing. Even the function I posted earlier has
a significant typo (see how mat.c changes) ... so I'm going to crawl
back into my private little cave and try to hide my shame. If nothing
else, I hope I've given the regulars here a chuckle. Sincerely. ;)
I couldn't have done a much worse job at communicating my problem.
function makeFillMatrix(x, y, w, h, r) {
var maxSize = 1638.4;
var scaleX = w/maxSize;
var scaleY = h/maxSize;
var mat = new Object();
mat.a = Math.round(Math.cos(r)*scaleX*1000)/1000;
mat.b = Math.round(Math.sin(r)*scaleX*1000)/1000;
mat.c = -Math.round(Math.sin(r)*scaleY*1000)/1000;
mat.d = Math.round(Math.cos(r)*scaleY*1000)/1000;
mat.tx = x + w/2;
mat.ty = y + h/2;
return mat;
}
.
- Follow-Ups:
- Re: Trouble deriving values from a matrix
- From: David Stiller
- Re: Trouble deriving values from a matrix
- References:
- Trouble deriving values from a matrix
- From: David Stiller
- Re: Trouble deriving values from a matrix
- From: David Stiller
- Trouble deriving values from a matrix
- Prev by Date: Re: coin flips and prime number theory
- Next by Date: Re: coin flips and prime number theory
- Previous by thread: Re: Trouble deriving values from a matrix
- Next by thread: Re: Trouble deriving values from a matrix
- Index(es):
Relevant Pages
|
Loading