POV-Ray : Newsgroups : povray.text.scene-files : What is it? HF checkers : Re: What is it? HF checkers Server Time
29 Jul 2024 02:19:37 EDT (-0400)
  Re: What is it? HF checkers  
From: Lummox JR
Date: 13 Jun 1999 01:58:15
Message: <37634901.7C36@aol.com>
Ron Parker wrote:
> Sorry, no, that's not what it does.  It calculates the normal at each
> corner, then linearly interpolates between corners.  There is no
> "plane normal."  The normal vector varies continuously across the
> surface of the object.  Whatever you're seeing, it's not due to
> normals.

Ah, I see. Of course, that's similar to what I thought it was doing
anyway.
At any rate, a "smooth <value>" keyword could be used to change from
linear interpolation to a non-linear value. It could be applied as an
exponent, for example, with 1.0 being the linear default. A higher
exponent would mean more smoothing.
For example, if the current routine interpolates between vectors based
on d and 1-d, the distance from each corner, then d^2 and (1-d)^2 would
tend to cause a lot more biasing toward the edges.
A simple interpolation (obviously not what the triangles use, but just
an example) might look like this:

(v1*d + v2*(1-d))/(d+(1-d))

If an exponent was added, it could be like this:

(v1*d^2 + v2*(1-d)^2)/(d^2+(1-d)^2)

Thus the weights in the average change in a non-linear fashion.

Lummox JR


Post a reply to this message

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