jxncxu 发表于 2006-5-6 16:31:00

如何确定点到直线距离

<FONT face=宋体 size=2>已知直线上的两点坐标,另一点(直线外)由用户输入,请问,据此如何确定点到直线距离</FONT>

罗jz 发表于 2006-7-2 12:26:00

用curve类

wzz1968 发表于 2006-7-2 15:17:00

<P>平面几何中点到直线的距离不是讲过了吗</P>
<P>先计算直线方程的参数,再用公式计算.</P>
<P>&nbsp;</P>

pglyxq 发表于 2006-7-2 23:32:00

pglyxq 发表于 2006-7-2 23:53:00

jxncxu 发表于 2006-7-18 00:42:00

<P>(defun $xdlsp_txtbrk (e pt / e0 e1 p10 le le0 le1 p1 px a a1 d d1 dx dm i i1<BR>&nbsp;&nbsp;&nbsp;txt txt1 cha tfhz tf pos<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<BR>&nbsp; (xdrx_setenttodb e)<BR>&nbsp; (if (= "TEXT" (xdrx_getentdxf 0))<BR>&nbsp;&nbsp;&nbsp; (progn<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq _pi2 (/ pi 2)<BR>&nbsp;&nbsp;&nbsp;&nbsp; le0 (entget e)<BR>&nbsp;&nbsp;&nbsp;&nbsp; e1 (assoc 1 le0)<BR>&nbsp;&nbsp;&nbsp;&nbsp; txt (cdr e1)<BR>&nbsp;&nbsp;&nbsp;&nbsp; p10 (assoc 10 le0)<BR>&nbsp;&nbsp;&nbsp;&nbsp; p1 (cdr p10)<BR>&nbsp;&nbsp;&nbsp;&nbsp; a (cdr (assoc 50 le0))<BR>&nbsp;&nbsp;&nbsp;&nbsp; a1 (+ a _pi2)<BR>&nbsp;&nbsp;&nbsp;&nbsp; px (trans pt 1 0)<BR>&nbsp;&nbsp;&nbsp;&nbsp; dx (xdrx_p2ldist px p1 (polar p1 a1 1e3))&nbsp; ;;此处的1e3代表什么?<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq dm (caadr ($xdlsp_textbox le0))</P>
<P>......................</P>
<P>&nbsp;</P>

pglyxq 发表于 2006-7-18 01:14:00

页: [1]
查看完整版本: 如何确定点到直线距离