求作两个三角形,使有相等的内切圆。
本帖最后由 chenmik 于 2023-5-9 16:33 编辑求作两个三角形,使有相等的内切圆。
本帖最后由 mahuan1279 于 2023-5-10 14:09 编辑
之前写了个求三角形内三个最大的同半径圆。
(defun c:tt()
(vl-load-com)
(setq p1 (getpoint) p2 (getpoint) p3 (getpoint))
(command "pline" p1 p2 p3 "c")
(setq lst (vl-sort
(mapcar '(lambda (x) (cons (apply 'distance (vl-remove x (list p1 p2 p3))) (list x))) (list p1 p2 p3))
'(lambda(a b) (<= (car a) (car b)))
)
)
(setq a(car (car lst))
b(car (cadr lst))
c(car (caddr lst))
m(+ a b c)
n(- (+ b c) a)
r(/c
(+ (/ (* 2 m n) (* b c))
-4
(sqrt (/ (* m n)(* (- (* 2 c) n) (- (* 2 b) n))))
(sqrt (/ (* m (- (* 2 c) n)) (* n (- (* 2 b) n))))
)
)
d1 (/ r (sqrt (- 1 (/ (* m n) (* 4 b c)))))
d2 (/ r (sqrt (- 1 (/ (* m (- (* 2 c) n)) (* 4 a c)))))
pt (list (/ (+ (* a (car (cadr (car lst))))(* b (car (cadr (cadr lst))))(* c (car (cadr (caddr lst))))) (+ a b c))
(/ (+ (* a (cadr (cadr (car lst)))) (* b (cadr (cadr (cadr lst)))) (* c (cadr (cadr (caddr lst)))))(+ a b c))
)
)
(command "circle" (cadr (car lst)) d1 "")
(setq ent1 (entlast))
(command "line" (cadr (car lst)) pt "")
(setq ent2 (entlast))
(command "circle" (cadr (cadr lst)) d2 "")
(setq ent3 (entlast))
(command "line" (cadr (cadr lst)) pt "")
(setq ent4 (entlast))
(setq center_1 (vlax-safearray->list
(vlax-variant-value
(vla-intersectwith (vlax-ename->vla-object ent1)
(vlax-ename->vla-object ent2)
1
)
)
)
)
(setq center_2 (vlax-safearray->list
(vlax-variant-value
(vla-intersectwith (vlax-ename->vla-object ent3)
(vlax-ename->vla-object ent4)
1
)
)
)
)
(command "circle" center_1 r "")
(command "circle" center_2 r "")
(command "circle" center_1 (* 2 r) "")
(setq ent5 (entlast))
(command "circle" center_2 (* 2 r) "")
(setq ent6 (entlast))
(setq center_3 (vlax-safearray->list
(vlax-variant-value
(vla-intersectwith (vlax-ename->vla-object ent5)
(vlax-ename->vla-object ent6)
1
)
)
)
)
(setq center_3_1 (list (nth 0 center_3)(nth 1 center_3)))
(setq center_3_2 (list (nth 3 center_3)(nth 4 center_3)))
(if (< (+ (distance center_3_1 (cadr (car lst))) (distance center_3_1 (cadr (caddr lst))) )
(+ (distance center_3_2 (cadr (car lst))) (distance center_3_2 (cadr (caddr lst))) )
)
(command "circle" (list (nth 0 center_3)(nth 1 center_3)) r "")
(command "circle" (list (nth 3 center_3)(nth 4 center_3)) r "")
)
(vla-delete (vlax-ename->vla-object ent1))
(vla-delete (vlax-ename->vla-object ent2))
(vla-delete (vlax-ename->vla-object ent3))
(vla-delete (vlax-ename->vla-object ent4))
(vla-delete (vlax-ename->vla-object ent5))
(vla-delete (vlax-ename->vla-object ent6))
) 本帖最后由 qjchen 于 2023-5-17 12:08 编辑
mahuan1279 发表于 2023-5-17 06:52
把题目稍微改动下,还是原图,求作PD上一点A,使得|AB|-|AC|=d(已知长度)。
这个问题是属于变化版本的阿波罗尼奥斯问题
https://baike.baidu.com/item/%E9 ... /2341739?fr=aladdin
可以采用类似这种方法解决(其中在ACAD中可以用的是7# Andyhon的3点,tan end per的构造方法完成)
http://bbs.mjtd.com/forum.php?mo ... %B6%CE%B2%EE&page=2
本帖最后由 mahuan1279 于 2023-5-15 10:26 编辑
|AB|=[(3b-c)*(b+c)*cosQ*cosQ+(b-c)^2]/
|AD|=[(b+c)^2*cosQ*cosQ-(b-c)^2]/
|AC|=[(3c-b)*(b+c)*cosQ*cosQ+(b-c)^2]/
|AB|-|AC|=(b+c)*cosQ=定值,也就是A点可以看成是双曲线与直线的交点。
这种几何作图题,好像全是这种求解一元三次以上的方程,自从cad有了参数画绘图,个人感觉这种作图题没啥意义了 能尺规作图,方法初始了点。
chenjun_nj 发表于 2023-5-11 17:23
能尺规作图,方法初始了点。
既然是尺规作图,第三步最好还是通过尺规作图来得到A‘点。 本帖最后由 mahuan1279 于 2023-5-12 09:53 编辑
r=[(c-b)+(c+b)*cosQ]*tanQ/4,其中角ADC=Q 本帖最后由 yimin0519 于 2023-5-17 13:53 编辑
做法供参考(做法均基于BD>BM):
做法一
做法二
把题目稍微改动下,还是原图,求作PD上一点A,使得|AB|-|AC|=d(已知长度)。
页:
[1]
2