POV-Ray : Newsgroups : povray.binaries.images : Seven dots show the sky Server Time
14 Aug 2024 13:25:46 EDT (-0400)
  Seven dots show the sky (Message 21 to 22 of 22)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Jaime Vives Piqueres
Subject: Re: Seven dots show the sky
Date: 23 Nov 2002 15:27:35
Message: <20021123212734.47aaf0b5.jaimevives@ignorancia.org>
On Wed, 20 Nov 2002 23:55:37 +0100
"Philippe Debar" <phd### [at] wanadoobe> wrote:

> I am not sure about al : it surely isn't the surface of the area 

  Yes, it's badly commented... it tries to be sqrt(sqrt(area)).

> you could have problem with square roots of negative numbers (you can
> fix that with abs, but there are several different ways to do that and
> they would produce quite different results, so...).

  I do not expect negative numbers on area light vectors!
 
> #local al=vlength(ala1)*vlength(ala2);

  Thanks! ...my maths are really poor.
 
> #local al=vlength(vdot(ala1,ala2));

  Hmmm... sorry, as I said my maths are really bad: I can understand
the prior form (vlength*vlength), but this one scapes me, and gives
always 0. There is a typo?


-- 
Jaime Vives Piqueres
		
La Persistencia de la Ignorancia
http://www.ignorancia.org


Post a reply to this message

From: Philippe Debar
Subject: Re: Seven dots show the sky
Date: 24 Nov 2002 06:25:25
Message: <3de0b725$1@news.povray.org>
"Jaime Vives Piqueres" <jai### [at] ignoranciaorg> wrote in message
news:200### [at] ignoranciaorg...
> On Wed, 20 Nov 2002 23:55:37 +0100
> "Philippe Debar" <phd### [at] wanadoobe> wrote:
>
> > I am not sure about al : it surely isn't the surface of the area
>
>   Yes, it's badly commented...

Well, it isn't released yet...


> it tries to be sqrt(sqrt(area)).
>
> > you could have problem with square roots of negative numbers (you can
> > fix that with abs, but there are several different ways to do that and
> > they would produce quite different results, so...).
>
>   I do not expect negative numbers on area light vectors!
>
> > #local al=vlength(ala1)*vlength(ala2);
>
>   Thanks! ...my maths are really poor.
>
> > #local al=vlength(vdot(ala1,ala2));
>
>   Hmmm... sorry, as I said my maths are really bad: I can understand
> the prior form (vlength*vlength), but this one scapes me, and gives
> always 0. There is a typo?



Yes, there is a typo - in my head :-( I confused two functions. It should be
vcross instead of vdot. vdot gives a float and is null whenever the two
vectors are perpendicular, which is generally the case for area light
vectors... sorry. Vcross returns a vector which is perpendicular to the two
input vectors and whose length is the surface area of the parallelogram they
define.



To get sqrt(sqrt(area)), I'd use pow(vlength(vcross(ala1, ala2)),.25) -
hoping that it is right this time.





Povingly,





Philippe


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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