and leaving the water.cal file as
dx=Dx;
dy=Dy;
dz=Dz;

but when i try to rotate de incident ray with on the y axis
dx=(Dx*cos(angle*PI/180))+(Dz*sin(angle*PI/180));
dz=(Dz*cos(angle*PI/180))-(Dx*sin(angle*PI/180));
dy=Dy;

i get the error
rpict: warning - aiming failure for light source "fixture"

Your problem stems from the fact that your modified angles do not obey reciprocity, which says that if you reverse the ray (light) direction, then the angles remain the same on either side. Both prisma and prism2 require this property to function. Implementing Snell's law correctly, you should get a working material.

The vector version of Snell's law may be found in ray/src/dielectric.c, or in an easier-to-read form on Wikipedia:

Note that the roles of the inside and outside indices of refraction, n1 and n2, reverse when you come from one side of the water verses the other. The n of water is about 1.3, and air is of course 1.0. (OK, quibblers, air is really 1.0003)

-Greg

···

From: Ignacio Munárriz <[email protected]>
Date: May 10, 2006 5:04:50 AM PDT

I'm trying tom model water with the prism1 & prism2 primitives. I`ve been
able to propagate the rays from sources using

Thanks Greg, i think i'm near to get it, but there is something that is not
working, i dont know if Rdot is the DOT product or the -DOT product, i tried
the two but it is still not working, i�ve been trying to do some tests with
calc and it seems to work but something must be wrong because rpict gives
the aiming error, what is the best tool in radiance to test this kind of
things, i say, testing cal files while sending rays

void prism2 water
9 transm dx dy dz reflect dxx dyy dzz water.cal
0
3 1 1 1

----- Original Message -----
From: "Gregory J. Ward" <[email protected]>
To: "Radiance general discussion" <[email protected]>
Sent: Wednesday, May 10, 2006 10:02 PM
Subject: Re: [Radiance-general] water simulation

Hi Ignacio,

Your problem stems from the fact that your modified angles do not
obey reciprocity, which says that if you reverse the ray (light)
direction, then the angles remain the same on either side. Both
prisma and prism2 require this property to function. Implementing
Snell's law correctly, you should get a working material.

The vector version of Snell's law may be found in ray/src/
dielectric.c, or in an easier-to-read form on Wikipedia:

Note that the roles of the inside and outside indices of refraction,
n1 and n2, reverse when you come from one side of the water verses
the other. The n of water is about 1.3, and air is of course 1.0.
(OK, quibblers, air is really 1.0003)

-Greg

From: Ignacio Mun�rriz <[email protected]>
Date: May 10, 2006 5:04:50 AM PDT

I'm trying tom model water with the prism1 & prism2 primitives.
I`ve been
able to propagate the rays from sources using

Regrettably, I don't have time to debug your function file at the moment. You can try using the debugcal script that comes with Radiance, giving it ray origins and directions on the standard input or using ximage:

This script assigns the standard variables from rayinit.cal so you can find out what is happening.

To answer your first question, the Rdot variable is the negative dot product, meaning that it is positive when a ray strikes the front of a surface material, and negative when it strikes the back side of the surface.

Hope this helps.
-Greg

···

From: Ignacio Munárriz <[email protected]>
Date: May 11, 2006 5:13:43 AM PDT

Thanks Greg, i think i'm near to get it, but there is something that is not
working, i dont know if Rdot is the DOT product or the -DOT product, i tried
the two but it is still not working, i´ve been trying to do some tests with
calc and it seems to work but something must be wrong because rpict gives
the aiming error, what is the best tool in radiance to test this kind of
things, i say, testing cal files while sending rays