// AngelCAD
shape@ manyballs_flat(uint n)
{
solid@ s = sphere(25);
double delta=45;
solid@[] zs;
for(uint i=0; i<n; i++) {
double x = i*delta;
for(uint j=0; j<n; j++) {
double y = j*delta;
for(uint k=0; k<n; k++) {
double z = k*delta;
zs.push_back(translate(x,y,z)*s);
}
}
}
return union3d(zs);
}
void main()
{
shape@ obj = manyballs_flat(n:16);
obj.write_xcsg(GetInputFullPath(),secant_tolerance:0.18);
}
Last active
May 21, 2018 10:41
-
-
Save arnholm/23739f7e0fb48f477aaf1b6bbeee968f to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment