Thanks to Russ Ludwick for these.
- Russ are we ever going to finish this project?
;----------------------------------------------------
; delta angle (degrees) given the chord and radius (real)
; 2 * inverse sine of [ chord ÷ (2 * radius) ] <-,
; not sure of the correct way to write the this |
(defun get-delta (chord radius / DeltaAng)
(if
(or (= (type chord) 'REAL)(= (type radius) 'REAL))
(setq
DeltaAng
(* 2 (rtd (isine (/ chord (* 2 radius)))))
)
); if
); defun
;------------------------------------------
; returns the arc length given the radius and delta(deg)
(defun get-arclength (delta radius / arcl)
(if
(or (= (type delta) 'REAL)(= (type radius) 'REAL))
(setq
arcl
(* (/ delta 360)(* 2 pi radius))
)
); if
); defun
;------------------------------------------
; returns the tangent distance, given the delta(deg) and radius
; tangent = radius * (tangent of 1/2 delta)
(defun get-tangent (delta radius / tangent)
(if
(or (= (type delta) 'REAL)(= (type radius) 'REAL))
(setq
tangent
(* radius (tan (dtr (/ delta 2))))
)
); if
); defun
;------------------------------------------
; returns the chord distance given the delta(deg) and radius
; chord = 2 * radius * (sine 1/2 delta)
(defun get-chord (delta radius /)
(if
(or (= (type delta) 'REAL)(= (type radius) 'REAL))
(setq
chord
(* 2 radius (sin (dtr (/ delta 2))))
)
); if
); defun
;------------------------------------------
; returns the mid ordinate, given the delta(deg) and radius
; midordinate = radius - (radius * cosine 1/2 delta)
(defun get-midordinate (delta radius / midord)
(if
(or (= (type delta) 'REAL)(= (type radius) 'REAL))
(setq
midord
(- radius (* radius (cos (dtr (/ delta 2)))))
)
); if
); defun
;------------------------------------------
; returns the radius given the chord and delta(deg)
; radius = chord ÷ (2 * sine 1/2 delta)
(defun get-radius (chord delta / radius)
(if
(or (= (type chord) 'REAL)(= (type delta) 'REAL))
(setq
radius
(/ chord (* 2 (sin (dtr (/ delta 2)))))
)
); if
); defun
;-----------------------------------------
; returns 1/2 delta given the tangent and radius
; 1/2 delta = inverse tangent of tangent ÷ radius
(defun get-half-delta (tangent radius /)
(if
(or (= (type tangent) 'REAL)(= (type radius) 'REAL))
(setq
half-delta
(rtd (atan (/ tangent radius)))
)
); if
); defun