POV-Ray : Newsgroups : povray.programming : Re: vectors : Re: vectors Server Time
3 Jul 2024 05:24:41 EDT (-0400)
  Re: vectors  
From: Christopher James Huff
Date: 31 Jan 2004 17:57:38
Message: <cjameshuff-B520BB.17574131012004@news.povray.org>
In article <401bfe3b@news.povray.org>, "Mathieu" <mat### [at] wanadoofr> 
wrote:

> I'am referring to the vectors used by the do_diffuse and do_specular
> 
> void do_diffuse (FINISH *Finish, RAY *Light_Source_Ray,VECTOR Layer_Normal,
> COLOUR Colour, COLOUR Light_Colour, COLOUR Layer_Pigment_Colour, DBL
> Attenuation);

Finish is the texture finish, Light_Source_Ray is the ray from the 
surface point to the light source, Layer_Normal is the surface normal 
perturbed by this texture layer, Colour is the color result, 
Light_Colour is the light color, Layer_Pigment_Color is the color of the 
pigment of the current layer at that point (blame the original authors 
for the misspelling of color ;-), Attenuation is the attenuation. These 
are all pretty simple to figure out, by their names and by what they're 
used for.


> void do_specular (FINISH *Finish, RAY *Light_Source_Ray, VECTOR REye, VECTOR
> Layer_Normal, COLOUR Colour, COLOUR Light_Colour, COLOUR
> Layer_Pigment_Colour);
> 
> And what about REye is it the vector opposite to Eye (from current surface
> point of view) ?

As computed in Diffuse(), it's a reversed version of Eye->Direction, Eye 
being the incoming ray.


> Are they all normalized ? (in fact it will be a great advantage for thing I
> am going to do :o))

If you want to know if it's normalized, check and see if it is.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

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