Google Classroom
GeoGebraGeoGebra Classroom

Sphere with four holes

Script

A1 = (2, 0, 0) A2 = (0, 2, 0) A3 = (-2, 0, 0) A4 = (0, -2, 0) r = Slider(1,4, 0.1, 1, 180, false, true, false, false) LA = CellRange(A1, A4) LB = Zip( r/abs(A) * A, A, LA) dmax = Slider(0.1, 2, 0.01, 1, 180, false, true, false, false) SetValue(dmax, 0.8) ind(d) = If(d<dmax, 1) inX(x, y) = r * sin(x) * cos(y) inY(x, y) = r * sin(x) * sin(y) inZ(x, y) = r * cos(x) Lcos = Zip( (x * x(B) + y * y(B) + z * z(B)) / r^2, B, LB) Lind = Zip( ind(F(inX(x, y), inY(x, y), inZ(x, y))), F, Lcos) p = Product(Lind) surf = Surface( p(ϕ, θ) inX(ϕ, θ), inY(ϕ, θ), inZ(ϕ, θ), ϕ, 0, π, θ, 0, 2*pi)