I'm trying to build a system for simulating sliding done arbitrary slopes, but it requires that I find the intersection of half a circle and an arbitrary function. However, when I use sympy, it does find a solution despite one clearly existing.
Is there a numerical approach I could take to this in NumPy?
See code below, where x, y, and r and all constants:
z = symbols('z')
print(solve(z * 1, ((r**2 - (z - x)**2) ** 0.5) + y))
p1 = plot(z, show=False)
p2 = plot(((r**2 - (z - x)**2) ** 0.5) + y, show=False)
p1.append(p2[0])
p1.show()
This results in:
[]
Despite a solution clearly existing:
Note that in the case used for testing, x=0.4, y=0.4, r=1
