|
|
On 12/27/23 19:13, Tor Olav Kristensen wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>> William F Pokorny <ano### [at] anonymousorg> wrote:
>>
>>> Assuming you want access to the real internally generated >first rays,
>>
>> Nope.
>> Just something like:
>>
>> #declare SFn_vdot = function (ax, ay, az, bx, by, bz) {ax*bx + ay*by + az*bz}
>>
>> #declare f_Reflectionx = function (Dx, Dy, Dz, Nx, Ny, Nz) {Dx - 2 * SFn_vdot
>> (Dx, Dy, Dz, Nx, Ny, Nz)* Nx}
>> #declare f_Reflectiony = function (Dx, Dy, Dz, Nx, Ny, Nz) {Dy - 2 * SFn_vdot
>> (Dx, Dy, Dz, Nx, Ny, Nz)* Ny}
>> #declare f_Reflectionz = function (Dx, Dy, Dz, Nx, Ny, Nz) {Dz - 2 * SFn_vdot
>> (Dx, Dy, Dz, Nx, Ny, Nz)* Nz}
>> ...
>
> You are already thinking in the right ways...
> To see how you can use that further, have a look here:
>
> Subject: Source code for "With and without a light_source"
> From: Tor Olav Kristensen
> Date: 2003-06-23 18:20:41
>
https://news.povray.org/povray.text.scene-files/message/%3CXns93A54E262AE2torolavkhotmailcom%40204.213.191.226%3E
>
> There's no vector cross expressions there. But that will require only 3 small
> exressions.
>
> --
> Tor Olav
> http://subcube.com
> https://github.com/t-o-k
>
>
OK. When I get to implementing 21 bit float dot, cross functions for
yuqk, I'll think about reflection / refraction functions too. I already
implemented a f_normal() function and have had thoughts on perhaps
implementing some sort of pre-range, bounded, f_trace() 'trace()'
equivalent too, but we'll see...
Bill P.
Post a reply to this message
|
|