POV-Ray : Newsgroups : povray.advanced-users : 4d matrix Server Time
29 Jul 2024 18:16:27 EDT (-0400)
  4d matrix (Message 1 to 3 of 3)  
From: Remco Poelstra
Subject: 4d matrix
Date: 24 Jan 2001 14:42:46
Message: <3A6F3069.4020803@home.nl>
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

From: Andy Siegert
Subject: Re: 4d matrix
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

From: Remco Poelstra
Subject: Re: 4d matrix
Date: 25 Jan 2001 15:59:15
Message: <3A7093DB.801@home.nl>
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

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