|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
I was wondering why povray uses an 4d matrix internally, when the
vectors are only 3d.
Does anybody know this?
Remco Poelstra
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Remco Poelstra <rjp### [at] homenl> wrote in message
news:3A6### [at] homenl...
> Hi,
>
> I was wondering why povray uses an 4d matrix internally, when the
> vectors are only 3d.
> Does anybody know this?
>
> Remco Poelstra
>
This is because while you can skew, scale, or rotate a 3d vector with a 3d
(3x3) matrix, in order to add translation, you need a 4d (4x4) matrix.
because of this, povray probably uses 4d matrices so it doesn't have to
store a seperate transform for translation, otherwise, POV-Ray would need to
store two transform information structures, with 4x4 matrices, POV-Ray can
get by with only one data structure stored internally, and it can still do
any possible transformation of a given 3d vector.
I hope this helps, and is hopefully also understandable.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Andy Siegert wrote:
> This is because while you can skew, scale, or rotate a 3d vector with a 3d
> (3x3) matrix, in order to add translation, you need a 4d (4x4) matrix.
> because of this, povray probably uses 4d matrices so it doesn't have to
> store a seperate transform for translation, otherwise, POV-Ray would need to
> store two transform information structures, with 4x4 matrices, POV-Ray can
> get by with only one data structure stored internally, and it can still do
> any possible transformation of a given 3d vector.
> I hope this helps, and is hopefully also understandable.
Thanks, it's exactly what I wanted to know,
Remco
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|