sphère

points sur la sphère

cylindre

points sur cylindre

portion de sphère

portion de cylindre

r: 5
h1 = 2.52 (slider from 0 to 5)
h2 = 3.5 (slider from 0 to 5, step 0.1)
α = 0.22689280275926285 rad (slider from 0° to 90°, step 1°)
A: (cos(α), sin(α), 0)
j: (0, 0, 1)
A' = Rotate(A, α, zAxis)
d = Ray((0, 0), A)
d' = Ray((0, 0), A')
d1 = Translate(d, Vector[(h1 * j)])
d1' = Translate(d', Vector[(h1 * j)])
d2 = Translate(d, Vector[(h2 * j)])
d2' = Translate(d', Vector[(h2 * j)])
O = Intersect(xAxis, d)
a = Sphere(O, r)
C = Intersect(d1, a)
D = Intersect(d1', a)
E = Intersect(d2, a)
F = Intersect(d2', a)
G = Intersect(d1', d2)
H = Intersect(d1, d1')
I = Intersect(d1, d1')
J = Intersect(d1, d2')
N: (0, 0, r)
S: (0, 0, (-r))
f = Line(N, S)
b, c, e, g = Cylinder(N, S, r)
B = Intersect(d1, g)
K = Intersect(d2, g)
L = Intersect(d1', g)
M = Intersect(d2', g)
H1: (0, 0, h1)
H2: (0, 0, h2)
arcEF = CircleArc(H1, E, F)
k = CircleArc(H1, C, D, xOyPlane)
p = CircleArc(O, C, E)
q = CircleArc(O, D, F)
i = Segment(M, L)
l = Segment(K, B)
s = CircleArc(H1, K, M)
t = CircleArc(H1, B, L, xOyPlane)