Skip to content

Instantly share code, notes, and snippets.

@stephenHartzell
Last active May 19, 2018 16:21
Show Gist options
  • Save stephenHartzell/73cf8f858cd2183515a3b35b58eb82c5 to your computer and use it in GitHub Desktop.
Save stephenHartzell/73cf8f858cd2183515a3b35b58eb82c5 to your computer and use it in GitHub Desktop.
from sympy.solvers import solve
from sympy import symbols
x, y, z, u, v, w, a, b, c, d = symbols('x y z u v w a b c d')
solutions = solve((x + d*u)**2/a**2 + (y + d*v)**2/b**2 + (z + d*w)**2/c**2 - 1, d)
print(solutions[0])
print(solutions[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment