Conic Through Point , GH Python

Hello,
I am trying to create a Conic curve that goes through a point.
I found this post (https://www.grasshopper3d.com/forum/topics/conic-arc) 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)