Fix the size of the cube to correctly contain a sphere of radius 1.0

This commit is contained in:
otthorn 2021-06-29 18:41:08 +02:00
parent 19a8e41621
commit f4602b5b7a

View file

@ -125,8 +125,9 @@ ray_d_norm = torch.norm(ray_d)
ray_d = ray_d / ray_d_norm
N = 100
t = np.linspace(-1, 1, N + 1)
N = 256
t = np.linspace(-2, 2, N + 1)
# A cube of size 2x2x2 is necessary to contain a sphere of radius 1.0
query_pts = np.stack(np.meshgrid(t, t, t), -1).astype(np.float32)
# print(query_pts.shape)