You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any recommendation on how to get a faster performance when meshing the union of a large number of spheres (in hundreds)?
My code is in C++, and I am currently doing: Tree out = sphere(2.51, -25.26, 22.72, 22.67); out = min(out, sphere(6.85, -25.81, 18.41, 23.85)); out = min(out, sphere(6.67, -25.85, 18.58, 23.79)); out = min(out, sphere(6.96, -25.79, 18.30, 23.89)); out = min(out, sphere(6.67, -25.95, 18.54, 23.79)); out = min(out, sphere(6.99, -25.78, 18.27, 23.90)); out = min(out, sphere(6.67, -26.05, 18.46, 23.80)); out = min(out, sphere(6.97, -25.81, 18.27, 23.89)); out = min(out, sphere(6.58, -26.18, 18.41, 23.79)); ...
where sphere calls the standard API sphere function.
Currently, it takes about 7 seconds for 170 spheres, and time grows with the number of spheres. I am wondering if there's an optimization option or a trick to make it faster?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Any recommendation on how to get a faster performance when meshing the union of a large number of spheres (in hundreds)?
My code is in C++, and I am currently doing:
Tree out = sphere(2.51, -25.26, 22.72, 22.67); out = min(out, sphere(6.85, -25.81, 18.41, 23.85)); out = min(out, sphere(6.67, -25.85, 18.58, 23.79)); out = min(out, sphere(6.96, -25.79, 18.30, 23.89)); out = min(out, sphere(6.67, -25.95, 18.54, 23.79)); out = min(out, sphere(6.99, -25.78, 18.27, 23.90)); out = min(out, sphere(6.67, -26.05, 18.46, 23.80)); out = min(out, sphere(6.97, -25.81, 18.27, 23.89)); out = min(out, sphere(6.58, -26.18, 18.41, 23.79)); ...
where sphere calls the standard API sphere function.
Currently, it takes about 7 seconds for 170 spheres, and time grows with the number of spheres. I am wondering if there's an optimization option or a trick to make it faster?
Beta Was this translation helpful? Give feedback.
All reactions