From f4602b5b7a0a542a0da595a8745746eca732d5ce Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 29 Jun 2021 18:41:08 +0200 Subject: [PATCH] Fix the size of the cube to correctly contain a sphere of radius 1.0 --- voxelisation.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/voxelisation.py b/voxelisation.py index 5f16c42..6fc213a 100644 --- a/voxelisation.py +++ b/voxelisation.py @@ -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)