Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```cpp
- // 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);
- }
- ```
Add Comment
Please, Sign In to add comment