Conic Through Point , GH Python

I am trying to create a Conic curve that goes through a point.
I found this post ( which does exactly what i need but it only works in 2d.

Can someone please help me to get this to work in 3d ?

I translated the c# to python, see attachment.

ConicArc .gh (12.0 KB)