fix normalize
This commit is contained in:
parent
386db2d6b8
commit
10c03e4651
@ -55,7 +55,7 @@ class Disk(Shapes):
|
||||
if t < 0:
|
||||
return None, None
|
||||
intersection_point = ray.origin + t * ray.direction
|
||||
intersection_point = intersection_point/np.linalg.norm(intersection_point)
|
||||
intersection_point = self.center + self.radius * (intersection_point - self.center)/np.linalg.norm(intersection_point - self.center)
|
||||
return t,intersection_point
|
||||
def get_normal(self, point):
|
||||
normal = (point - self.center)/self.radius
|
||||
|
Loading…
Reference in New Issue
Block a user