POV-Ray : Newsgroups : povray.general : Smooth level for smooth_triangle. : Re: Smooth level for smooth_triangle. Server Time
13 May 2024 09:16:45 EDT (-0400)
  Re: Smooth level for smooth_triangle.  
From: Bald Eagle
Date: 19 Nov 2023 13:45:00
Message: <web.655a568a84c692a31f9dae3025979125@news.povray.org>
"GioSeregni" <gms### [at] hotmailcom> wrote:

Sounds good.

> It seems correct, PovRay does not give errors, but I would like the rounding of
> the edges to be less, as per this diagram.

So you want a sharper curvature.

Try this:

Take your starting triangle and find the area.  1/2 base times height, or
there's a matrix determinant way.

Use that as a multiplier - a weighting to that vertex normal.
Do that every time you find a matching triangle.  Weight the normal by the
triangle's area before adding it.
Never mind dividing / averaging - I think that would just ad an extra
unnecessary step - just use vnormalize ().

This way, the normal of the edge is influenced more by the bigger area than the
smaller transition area, and there should be a more sudden and pronounced change
of direction as you progress from one large face across the smaller face to the
other.

- BW


Post a reply to this message

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