Closed hududed closed 2 years ago
Thanks for your questions! The origin point for sphere generation corresponds to a single voxel at the center of the sphere. The +1 in the diameter calculation makes the diameter in voxels an odd number so that there will always be a center voxel for the sphere.
Ellipsoid generation is very similar, and I have added an example ellipsoid generation function to the primitives file (#46).
not an issue but some questions. What's the rationale behind the
+1
indiameter = (radius*2) + 1
in sphere generation? Is it just simplifying the for loop index? Also, how would one extend this to an ellipsoid?