Só primeiro quadrante

Pegar Bola

Módulo

Ângulo

Nova Bola

Robô 

fc = false
e = 0 (slider from 0 to 200, step 1)
rotacao: 35
rot: (rotacao * π / 180)
modulo: 5
B: (0, 0, 5)
A = (0, 0, 0)
a, c, d, b = Cylinder(A, B, 0.3)
alpha = If(e < 50, 0, If[e ≥ 50 ∧ e < 100, (rot * (e - 50) / 50), If[e ≥ 100 ∧ e < 150, (rot * (1 - (e - 100) / 50)), If[e ≥ 150, 0]]])
m = If(e < 50, 1 + ((modulo - 1) * e / 50), If[e ≥ 50 ∧ e < 150, modulo, If[e ≥ 150, 1 + ((modulo - 1) * (1 - (e - 150) / 50))]])
D: B + (m - 10; alpha)
C: B + (m; alpha)
E: C + (3; alpha; ((-π)) / 2)
j = Segment(C, E)
f = Segment(D, C)
F: E + (1; alpha + π; ((-π)) / 4)
G: E + (1; alpha; ((-π)) / 4)
H: G + (1; 0; ((-π)) / 2)
g = Segment(E, G)
h = Segment(G, H)
i = Segment(E, F)
I: F + (1; 0; ((-π)) / 2)
k = Segment(F, I)
ct1 = Textfield(modulo)
ct2 = Textfield(rotacao)
fb = If(e > 0 ∧ e < 50, true, false)
fa = If(e > 50 ∧ e < 100, true, false)
x_1 = If(fc, Random[2, 6], (((Random[0, 1] * 2) - 1) * Random[2, 6]))
y_1 = If(fc, Random[2, 6], (((Random[0, 1] * 2) - 1) * Random[2, 6]))
n: 7.4
o: sin(rot)
p: y_1 / modulo
certo_m = If(abs(x_1^(2) + y_1^(2) - modulo^(2)) < 0.1, true, false)
certo_r = If(abs(y_1 / modulo - sin(rot)) < 0.002 ∧ abs(x_1 / modulo - cos(rot)) < 0.002, true, false)
l = Sphere(If[certo_m ∧ certo_r ∧ e ≥ 100, C + (4.5; alpha; ((-π)) / 2), (x_1, y_1, 0.5)], 0.5)