;; Ellipse Parameter -> Point - Lee Mac
;; Returns the UCS point for the given ellipse parameter
;; dxf - Ellipse DXF data (DXF groups 10, 11 & 40)
;; par - Ellipse parameter
(defun LM:param
->point
( dxf par
/ a b m r
) )
)
)
)
;; Point -> Ellipse Parameter - Lee Mac
;; Returns the ellipse parameter for the given point
;; dxf - Ellipse DXF data (DXF groups 10, 11 & 40)
;; pt - UCS Point on Ellipse
(defun LM:point
->param
( dxf pt
/ a b m r u x y
) )
)
)
(setq u
(- (+ pi pi
) (acos
(/ x a
)))) )
(rem (+ pi pi u
) (+ pi pi
)) )
;; Matrix x Vector - Vladimir Nesterovsky
;; Args: m - nxn matrix, v - vector in R^n
)
;; ArcCosine - Lee Mac
;; Args: -1 <= x <= 1
)
)