coucou
Like I said I work slowly,
here is a first solution, at least as I understood the problem.
at first you must change the values of O,delta, R1 et R2 in the code,
but you can make a dcl.
I still do not understand the value of "O"
it is possible to do better, no doubt, but I am an eternal beginner
amicalement
(defun tan (arg)
(/ (sin arg)(cos arg))
)
;
(defun acos (arg)
(if (<= -1 arg 1)
(atan (sqrt (- 1 (aucarré arg))) arg)
)
)
;
(defun aucarré (arg)
(if (numberp arg)
(* arg arg)
)
)
;
(setq delta 1.84
O 0.9
R1 11.5
R2 5.9
)
(defun test (delta o r1 r2 / pdep t1 alpha t0 t2 e cr1 angint pligne2 cr2 cr3 y y1 y2)
(setq osmodeori (getvar "osmode"))
(setvar "osmode" 0)
(setq pdep '(0 0)
T1 (* (+ R2 O)(tan (/ delta 2)))
alpha (acos (/ (- R1 R2 O)(- R1 R2)))
T0 (+ t1 (* (- r1 r2) (sin alpha)))
t2 (- t1 (* r2 (sin alpha)))
e (- (/ (+ r2 o) (cos (/ delta 2))) r2)
cr1 (list T0 R1)
angint (- pi delta)
pligne2 (list (* (cos angint) 20) (* (sin angint) 20))
cr2 (polar (polar pdep angint T0) (- angint (/ pi 2)) r1)
cr3 (polar pdep (/ angint 2) (+ e r2))
y (- (+ r2 o)(* r2 (cos alpha)))
y1 (list t2 y)
y2 (polar (polar pdep angint T2) (- angint (/ pi 2)) y)
)
(command "_line" pdep (polar pdep 0 20) "")
(command "_line" pdep pligne2 "")
(setvar "cecolor" "1")
(command "arc" "ce" cr3 y2 y1)
(setvar "cecolor" "3")
(command "arc" "ce" cr1 y1 (list t0 0))
(command "arc" "ce" cr2 (polar pdep angint T0) y2)
(setvar "cecolor" "256")
(setvar "osmode" osmodeori)
)
(test delta O R1 R2)
(command "_zoom" "_E")