53rd shape file -rectangular hole in a sphere, by users equations


 Adapted from shap3d47, square hole in a sphere.


 This supersedes shap3d24 and shap3d25.


 The sphere has a radius of R, and so z = sqrt(R^2 - x^2 - y^2), always.


 The equations, say g1(x,y,z), for the inner straight edge of the first electrode are 

 x = sx, y = sy*tan(phi), where phi = 0 to pi/4.

 The equations, say g2(x,y,z), for the outer circular edge are 

 x = r*cos(phi), y = r*sin(phi).


 In the usual fashion we can combine these by using the general equation

 g(x,y,z) = (1-f)*g1+f*g2,

 where f goes from 0 to 1.  

 This reproduces g1 when f = 0, and g2 when f = 1.

 To concentrate the segments at the inner edges we have used f^2

 g(x,y,z) = (1-f^2)*g1+f^2*g2


 Here sx = 0.25, sy = 0.1, r = 0.75, R = 1 and 2 symmetry planes are used. 


 The equation for z looks complicated, but is essentially sqrt(R^2 - x^2 - y^2).


 It has been necessary to disable the 'aspect ratio' check by entering a large negative number.