Plantilla 3D
Author: Rafael Losada Liste

C = (-6.186720746758199, 5.2760651649690375)
z2 = OrthogonalLine(C, xAxis)
z0 = Circle(C, 0.62)
Z4 = Intersect(z0, z2, 1)
Z3 = Intersect(z0, z2, 2)
zElipse2 = Ellipse(Z3, Z4, 0.65)
Z = Point(zElipse2)
Z7, Z8 = Intersect(zElipse2, z2)
zAngInc = Angle(Z8, C, Z)
z1 = OrthogonalLine(C, yAxis)
Z2 = Intersect(z0, z1, 2)
Z1 = Intersect(z0, z1, 1)
zElipse1 = Ellipse(Z1, Z2, 0.65)
XY = Point(zElipse1)
alto = 7 (slider from 0 to 10, step 0.1)
u = (0, -1)
v: alto cos(zAngInc) u
O = Translate((0, 0), v)
d = OrthogonalLine(O, yAxis)
G = Point(d)
w = Vector((0, 0), G)
ancho = 6 (slider from 0 to 10, step 0.1)
radio: ancho / 2
nada = 0
Z5, Z6 = Intersect(zElipse1, z1)
z4 = Segment(Z5, Z6)
z3 = Segment(Z7, Z8)
zPunto1 = Intersect(zElipse2, zElipse1, 1)
zPunto2 = Intersect(zElipse2, zElipse1, 4)
zSeg2 = Segment(zPunto1, zPunto2)
zAngRot = Angle(Z6, C, XY)
n = 3
α: 360 / n
puntosA = Sequence(PuntoEsfera[C, XY, Z, radio, 0, s α], s, 0, n)
puntosB = Sequence((x(w) + x(Element[puntosA, s]), y(w) + y(Element[puntosA, s])), s, 1, n + 1)
B1 = Element(puntosB, 1)
B2 = Element(puntosB, 2)
B3 = Element(puntosB, 3)
poly2, b1, b2, b3 = Polygon(B1, B2, B3)
aristas = Sequence(Segment[Element[puntosB, s], Element[puntosA, s]], s, 1, n)
angulos = Sequence(Angle[Element[puntosB, s + 1], Element[puntosB, s], Element[puntosA, s + 1]], s, 1, n)
aristasVisibles = Sequence(If[s > 1 ∧ Element[angulos, s - 1] > 180 ° ∧ Element[angulos, s] > 180 °, false, If[s ≟ 1 ∧ Element[angulos, n] > 180 ° ∧ Element[angulos, s] > 180 °, false, true]], s, 1, n)
a1 = Element(aristas, 1)
a1b = Element(aristas, 1)
a2 = Element(aristas, 2)
a2b = Element(aristas, 2)
a3 = Element(aristas, 3)
a3b = Element(aristas, 3)
A = Point(a1)
B = Point(a2)
D = Point(a3)
poly1, p3, p2, p1 = Polygon(A, D, B)
carasVisibles = Sequence(If[Element[angulos, s] > 180 °, false, true], s, 1, n)
β = Angle(B1, B2, B3)

Tool: Punto3D
[C,XY,Z,Lista 3D]
Input: C, XY, Z, A
Output: H'

z1 = OrthogonalLine(C, yAxis)
z0 = Circle(C, 0.62)
Z1 = Intersect(z0, z1, 1)
Z2 = Intersect(z0, z1, 2)
zElipse1 = Ellipse(Z1, Z2, 0.65)
Z5, Z6 = Intersect(zElipse1, z1)
z2 = OrthogonalLine(C, xAxis)
Z3 = Intersect(z0, z2, 2)
Z4 = Intersect(z0, z2, 1)
zElipse2 = Ellipse(Z3, Z4, 0.65)
Z7, Z8 = Intersect(zElipse2, z2)
zAngInc = Angle(Z8, C, Z)
zAngRot = Angle(Z6, C, XY)
A: {3, 0, 0}
H': (Element[A, 1] sin(zAngRot) + Element[A, 2] cos(zAngRot), -Element[A, 1] cos(zAngRot) sin(zAngInc) + Element[A, 2] sin(zAngRot) sin(zAngInc) + Element[A, 3] cos(zAngInc))

Tool: PuntoEsfera
PuntoEsfera[C,XY,Z,radio,latitud,longitud]
Input: C, XY, Z, radio, latP, longP
Output: P'

z1 = OrthogonalLine(C, yAxis)
z0 = Circle(C, 0.62)
Z1 = Intersect(z0, z1, 1)
Z2 = Intersect(z0, z1, 2)
zElipse1 = Ellipse(Z1, Z2, 0.65)
z2 = OrthogonalLine(C, xAxis)
Z3 = Intersect(z0, z2, 2)
Z4 = Intersect(z0, z2, 1)
zElipse2 = Ellipse(Z3, Z4, 0.65)
P: {radio cos(latP °) cos(longP °), radio cos(latP °) sin(longP °), radio sin(latP °)}
P' = Punto3D(C, XY, Z, P)