Re: Help with understanding matrices
Re: Help with understanding matrices
- Subject: Re: Help with understanding matrices
- From: Doug McNutt <email@hidden>
- Date: Tue, 12 Feb 2008 14:54:30 -0700
At 20:12 +0000 2/12/08, Simon Topliss wrote:
>Thanks for the reply, Doug. Unfortunately, that raised more questions than answers!
Yeah. I'm not surprised. I have a PhD in physics and have used Heisenberg matrix mechanics to calculate quantum mechanical energy levels but I still have trouble understanding Postscript. Just having the y coordinate on a screen increase downward gives me fits. (And I really think that's Apple's fault because of the relationship of the Mac 128 to printing.)
>Is what I'm trying to do even possible with the data I have from Illustrator?
Perhaps. Those .707xxx values you see look like sqrt(2)/2 which is the cosine of 45 degrees so you're getting somewhere.
>There are Scripting Additions for advanced maths, but I've no idea what to look for to solve the equation. Satimage.osax has a COS and SIN function. I afraid to admit that I've no idea what "phi" relates to.
Mathematicians commonly use lower case Greek letters for angles. I just picked phi as an example. It would be the counterclockwise angle representing the rotation about an axis perpendicular to the paper. For the numbers I see, phi would be 45 degrees but you'll probably have to use radians with those "advanced" math functions. 180 degrees is pi (3.141592) radians.
>Please be gentle with me. It's my first time!
You probably need to find a book and someone local who can spend some time with you. You're welcome to visit in Colorado Springs if you would like. Where are you? Sonoco-trident.com sounds like an oil barron somewhere in Texas.
For experimenting with matrices and vectors Microsoft Excel can be useful. It's faster than AppleScript and you can get answers quickly. Maple and Mathematica are much better but both have steeper learning curves than AppleScript (and that IS scary.). They are also expensive unless you have a university link. I have a liking for perl which can be pretty slow but the gratification is immediate without any compiling and linking.
You can probably calculate sines and cosines of an angle you want to apply and a translation distance and direction. conversion to {a,b,c,d,tx, and ty} are then just formulas for figuring values in a list. Send the list to Illustrator and see what happens. You'll probably have fits because the first rotation will move the object off the paper because the rotation is about the origin, not the center of the object. When you figure out how to correct that with a translation back onto the paper you'll be on the right track. Start with a small angle and you will probably still have something to look at.
But we're pretty far off topic for this list. And no. I don't have another suggestion. I have never used Illustrator but I have created postscript graphs from perl and Excel. Postscript, by itself, is a lot like forth and you can write programs in it. It might help to create Postscript with a text editor and pass it to something like ghostscript or Adobe's distiller - Apple's preview ? - to see what the matrices do to, say, a simple rectangle.
--
--> If you are presented a number as a percentage, and you do not clearly understand the numerator and the denominator involved, you are surely being lied to. <--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden