Circle by Point and Tangent

(
	local pt1 = point pos:[50,50,0] , pt2 = point pos:[10,45,0],
	p = pt1.pos, vo = pt2.pos , d = distance p vo , vi = p+(normalize (p-vo))*d,
	r = d/0.551915024494, -- http://gorkamendieta.es/wordpress/maxscript-circle-using-bezier-curves/
	m = matrixFromNormal (normalize (vo-p)) , c = p+m.row1*r, -- there should be better solution to get the vector (m.row1)
	cr = circle radius:r pos:c dir:-m.row3
	in coordsys local rotate cr (AngleAxis -90 x_axis)
	addModifier cr (Edit_Spline())
	select cr ; max modify mode ; subObjectLevel = 1
)