POV-Ray : Newsgroups : povray.advanced-users : 4d matrix : Re: 4d matrix Server Time
29 Jul 2024 20:26:51 EDT (-0400)
  Re: 4d matrix  
From: Andy Siegert
Date: 24 Jan 2001 15:01:38
Message: <3a6f34a2$1@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.