• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Help with understanding matrices
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with understanding matrices


  • Subject: Re: Help with understanding matrices
  • From: Simon Topliss <email@hidden>
  • Date: Tue, 12 Feb 2008 20:12:37 +0000

On 12 Feb 2008, at 19:46, Doug McNutt wrote:

At 18:41 +0000 2/12/08, Simon Topliss wrote:
Hello everyone. Is there a maths genius in the room?

I never studied matrices at school and I'm having a great deal of difficulty understanding how to do matrix calculations.
and some more.

First: What you might have learned in school about matrix transformations would have been useless. Adobe's idea of matrix multiplication and other operations does not match the textbooks.

A 2 dimensional rotation is a 2 x 2 matrix multiplication in "maths" but a 3 x 3 operation with one column always (0,0,1) in Adobe's graphics. That's a bit like homogeneous equations in the mathematics of projective geometry but not quite. The a, b, c, d, tx, and ty values are the 6 values that are not the left column of the 3 x 3 matrix. The upper left 2x2 square:

a = cos phi  b = sin phi
c = -sin phi  d = cos phi

Is pretty much a real mathematical rotation but you'll be bothered because it's not centered on the object and the angles are not measured the way mathematicians think about it

The bottom row represents translation by tx and ty with a 1 at the right end

tx  ty  1

Two zeros complete the matrix in the upper two thirds of the right column.

Scaling is accomplished as a rotation of zero degrees with the trig functions multiplied by the scale factor. The cosines of a zero degree rotation are 1 and the sines are zero.

Adobe's "Postscript Language Reference Manual - the red book - by Addison Wesley ISBN 0-201-18127-4 is the bible and you will need it. Page 155 in the 2nd edition.

Postscript also does things differently than does open GL which uses 4 x 4 matrices to describe 3 D images in a manner that more closely resembles projective geometry.

And matrix multiplication begins with dot products. Each element of the result is the dot product of a row vector from the left matrix and a column vector from the right. The result is not commutative so A * B is not necessarily the same as B * A. The dot product is the some of the products of the components of two vectors.

AppleScript is not the right tool for extensive matrix manipulations.

Wuh? Meh? Fuh? Guh? Duh?

Thanks for the reply, Doug. Unfortunately, that raised more questions than answers!

Is what I'm trying to do even possible with the data I have from Illustrator?

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.

Please be gentle with me. It's my first time!

Simon


_______________________________________________ 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
  • Follow-Ups:
    • Re: Help with understanding matrices
      • From: Rob Stott <email@hidden>
    • Re: Help with understanding matrices
      • From: Doug McNutt <email@hidden>
References: 
 >Help with understanding matrices (From: Simon Topliss <email@hidden>)
 >Re: Help with understanding matrices (From: Doug McNutt <email@hidden>)

  • Prev by Date: Re: Delete Bug or Feature?
  • Next by Date: Re: Delete Bug or Feature?
  • Previous by thread: Re: Help with understanding matrices
  • Next by thread: Re: Help with understanding matrices
  • Index(es):
    • Date
    • Thread