POV-Ray : Newsgroups : povray.advanced-users : Calculating normal vectors for meshes : Re: Calculating normal vectors for meshes Server Time
29 Mar 2025 07:21:45 EDT (-0400)
  Re: Calculating normal vectors for meshes  
From: Bald Eagle
Date: 14 Mar 2025 08:55:00
Message: <web.67d42686dd89838fb00a87a025979125@news.povray.org>
yesbird <sya### [at] gmailcom> wrote:

> Is there some ready-to-use code or utility for normal vectors
> calculation for meshes ?

You'd think there was.  And I suppose that there really ought to be some
existing under-the-hood calculation of normals for smooth_triangles.

(Maybe Pose-Ray does it?  Silo?   TdG would know)

I'd say that what you're going to have to do is take all of your triangle data
and put it into an array, and then cycle through the array to make your smooth
triangles and calculate normals manually.

I'm at work for the next 7 hours, but I can post working code from one of my
mesh / mesh2 scenes if no one beats me to it.

- BW


Post a reply to this message

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