-- Core
my_model(x[3], a[1])
{
xt = x[1];
yt = x[2];
zt = x[3];

plane1 = 6^2 - yt^2 ;

plane2 = 2^2 - zt^2;

plane3 = 3^2 - (xt-3.5)^2;

plane4 = 3^2 - (xt+3.5)^2;

plane5 = 3^2 - (yt-3.5)^2;

plane6 = 3^2 - (yt+3.5)^2;

plane7 = 3^2 - (zt-3.5)^2;

plane8 = 3^2 - (zt+3.5)^2;

plane9 = 0.4^2 - xt^2;

plane10 = 0.4^2 - yt^2;

plane11 = 0.4^2 - zt^2;

torus1 = 1^2-xt^2-yt^2-zt^2-10^2+2*10*sqrt(yt^2+zt^2);

torus2 = 1^2-xt^2-yt^2-zt^2-10^2+2*10*sqrt(xt^2+zt^2);

torus3 = 1^2-xt^2-yt^2-zt^2-10^2+2*10*sqrt(xt^2+yt^2);

sphere1 = 5^2-xt^2-yt^2-zt^2;

sphere2 = 4.5^2-xt^2-yt^2-zt^2;

sphere3 = 2^2-xt^2-yt^2-zt^2;

body1 = sphere1 & plane3 \ sphere2;

body2 = sphere1 & plane4 \ sphere2;

body3 = body1 | body2;

body4 = body3 & plane5;

body5 = body3 & plane6;

body6 = body4 | body5;

body7 = body6 & plane7;

body8 = body6 & plane8;

body9 = body7 | body8;

body10 = sphere3;

body = body9 | body10;

ring1 = torus1 & plane9;

ring2 = torus2 & plane10;

ring3 = torus3 & plane11;

my_model = body | ring1 | ring2 | ring3;
}

