POV-Ray : Newsgroups : povray.programming : Raw_Normal : Re: Raw_Normal Server Time
23 Apr 2024 13:29:29 EDT (-0400)
  Re: Raw_Normal  
From: jr
Date: 24 Jun 2023 01:55:00
Message: <web.649684c26e9a403cb49d80446cde94f1@news.povray.org>
hi,

"225012156" <225### [at] csueducn> wrote:
> What exactly is the definition of Raw_Normal? ... tried to
> construct a little triangular element ...
> # Calculate normal vector (cross product)
> normal = np.cross(edge1, edge2)
>
> # Normalized normal vector
> normal_normalized = normal / np.linalg.norm(normal)
>
> return normal_normalized
> The output is [-0.41867126 0.80698158-0.41652743]
> This is really confusing to me

hoping that my lack of maths won't betray me :-) but aren't you comparing
"apples and oranges" ?  the face normal of a triangle is not the same as a
'vcross' product.  (see first link for 'vcross' definition, second link is a C
program source where face normals get calculated (as an option).  hth)

<https://wiki.povray.org/content/Reference:Vector_Expressions#Functions>
<https://drive.google.com/file/d/10WT-D3MP4qYxnP1BYu5f_ZN_xmOo1P5W/view?usp=sharing>


regards, jr.


Post a reply to this message

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