POV-Ray : Newsgroups : povray.programming : Raw_Normal : Raw_Normal Server Time
19 May 2024 10:29:25 EDT (-0400)
  Raw_Normal  
From: 225012156
Date: 23 Jun 2023 22:50:00
Message: <web.6496590bf1906642aec747c4fc1cf70c@news.povray.org>
What exactly is the definition of Raw_Normal? I always thought it was a normal
vector on the surface where the light intersects with Object, but I tried to
construct a little triangular element
#declare fugai_48 = mesh2 {
vertex_vectors {
3
<-4.50633802, 3.69271012, -10.9775885>,
<-4.65835461, 3.42382252, -11.3457332>,
<-4.93662437, 3.47962036, -10.95792829>,
}
face_indices {
1
The < 0 >,
}
}
Its Raw_Normal is [-0.41867095 0.80698168-0.41652757]
But I wrote a function in python that computes the normal vector of a surface
def calculate_normalized_normal(v1, v2, v3):
# Compute two side vectors
edge1 = v2 - v1
edge2 = v3 - v1

# 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


Post a reply to this message

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