Discussion:
Confused about coordinate systems... + how we can use them optimally...
Stuart Axon
2009-05-13 10:10:12 UTC
Permalink
I guess the coordinate system can be changed anywhere in the matrix stack?

Although I wonder in real 'bots how much this actually happens?

- Also, do we need to transform by the coordinate system every time we place a shape
(I'm guessing instead of starting with the identity matrix, we would start with the coordinate systems matrix?)

Or do we just need to have the transformation in the point of the stack where the coordinate system is changed?
ricardo lafuente
2009-05-27 04:55:48 UTC
Permalink
Post by Stuart Axon
I guess the coordinate system can be changed anywhere in the matrix stack?
Although I wonder in real 'bots how much this actually happens?
- Also, do we need to transform by the coordinate system every time we place a shape
(I'm guessing instead of starting with the identity matrix, we would start with the coordinate systems matrix?)
Or do we just need to have the transformation in the point of the stack where the coordinate system is changed?
i'm a bit at a loss as to what is meant by 'changing the coordinate
system'; i'll suppose you're referring to the translate operations we're
using for the CENTER transform mode.

since the translation values will depend on the position of each shape,
each shape will have to start with its own specific translation.

so the order of applying transforms would be:
* if in CENTER mode, translate to the centerpoint of the shape
* apply the Bot transformation matrix (set by translate(), rotate(), etc.)
* apply shape-specific transformations (set by keyword arguments or Grob
methods)
* draw the shape
* reset transformation to identity matrix.

not sure if this is what you asked about though :/

Continue reading on narkive:
Search results for 'Confused about coordinate systems... + how we can use them optimally...' (Questions and Answers)
22
replies
what is motivation?
started 2007-07-03 08:28:24 UTC
philosophy
Loading...