There's more than one way to do things PerlMonks

### goo canvas transformation matrix

 on Aug 15, 2008 at 04:43 UTC Need Help??

renegadex has asked for the wisdom of the Perl Monks concerning the following question:

could somebody explain what is a goo canvas transformation matrix?

Replies are listed 'Best First'.
Re: goo canvas transformation matrix
by eosbuddy (Scribe) on Aug 15, 2008 at 09:29 UTC
Goo::Canvas Graphing demo tells me that Goo::Canvas is a graphing tool for conversion of graphs (typically this involves translation or rotation of images). Translation or rotation of images in mathematical terms implies taking an old array and moving it into a new array (the new array will contain the rotated or translated image). The old array -> new array is achieved by matrix multiplication:
```new_array = transformation_matrix * old_array
So the transformation matrix is just a multiplicant to create the new array - hope that makes sense. Numerically, this matrix will depend on what you're trying to achieve (so I could explain it to you only conceptually).
Re: goo canvas transformation matrix
by zentara (Archbishop) on Aug 15, 2008 at 13:48 UTC
eosbuddy is right. The one thing I would mention is that there is no GooCanvasTransformation Matrix. Goo is based on Cairo, and their is the Goo::Cairo::Matrix . Read the Cairo docs( although the explanation is minimal)

Goo and Cairo are still developing, so the matrices are still hidden behind the scenes, but in something more mature, like Tk::Zinc, you can save the state of the matrix any any point, and restore it later, and even create your own matrix manually.

Basically a matrix is some sin(\$angle), cos(\$angle), plus translation elements, that get applied to some vector. When at it's simplest( like a simple translation or rotation of a point about a center), it's easy..... but things become complicated very quickly, and it all ends up in giant matrix equations, that are not so simple for humans to understand, but computers find it easy. See matrix transformations . You can spend 8 years in college mastering it, then go to work for Steven Speilberg's Dreamworks, and do it on supercomputers, making state-of-the-art 3d animation.

I'm not really a human, but I play one on earth Remember How Lucky You Are

Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://704475]
Approved by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2022-05-16 09:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
Do you prefer to work remotely?

Results (62 votes). Check out past polls.

Notices?