2009-01-13 18:03:21 +05:00
|
|
|
#
|
|
|
|
## Cube and Spheres
|
|
|
|
#
|
|
|
|
algebraic3d
|
|
|
|
|
|
|
|
# a cube
|
|
|
|
solid cube = plane (0, 0, 0; 0, 0, -1)
|
|
|
|
and plane (0, 0, 0; 0, -1, 0)
|
|
|
|
and plane (0, 0, 0; -1, 0, 0)
|
|
|
|
and plane (1, 1, 1; 0, 0, 1)
|
|
|
|
and plane (1, 1, 1; 0, 1, 0)
|
|
|
|
and plane (1, 1, 1; 1, 0, 0);
|
|
|
|
|
Fix various typos
Found via `codespell -q 3 -S ./external_dependencies/pybind11 -L alledges,allright,ane,anormal,ans,apoints,ba,boxs,cancle,childs,co-ordinate,co-ordinates,daty,enty,filld,hel,identifyable,ist,linz,lod,ned,nd,selt,statics,suround,thev,thist,thisy,timere,upto,wel`
2022-03-26 03:21:48 +05:00
|
|
|
# two spheres
|
2009-01-13 18:03:21 +05:00
|
|
|
solid sph1 = sphere (0.5, 0.5, 0.5; 0.58);
|
|
|
|
solid sph2 = sphere (0.5, 0.5, 0.5; 0.75);
|
|
|
|
|
|
|
|
# cut cube with inner and outer sphere
|
|
|
|
solid main = cube and sph2 and not sph1;
|
|
|
|
|
|
|
|
tlo main;
|