POV-Ray : Newsgroups : povray.programming : How normal vector computation works in Povray ? : How normal vector computation works in Povray ? Server Time
1 Jul 2024 07:07:37 EDT (-0400)
  How normal vector computation works in Povray ?  
From: Helix
Date: 19 May 2004 12:30:01
Message: <web.40ab8a7947c00e213cca0c610@news.povray.org>
I have looked into Povray's code source, and especially torus.cpp. I have
understood the torus_inersection() function, but the torus_normal()
function is strange.

If I'm not right, in order to obtain the normal vector at a given point on a
surface, I have to get the partial derivative of the surface equation (the
gradient).

Vector N(df/dx, df/dy, df/dz)

So for the torus, I obtain:





In torus_normal() function, Povray doesn't proceed like this... I tried to
inject my normal formula, but it doesn't work.

So, why it doesn't work ? And how Povray proceed to compute normal vector ?

Thanks,


Post a reply to this message

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