只需一步,快速开始
图示,求C点到AB线段的垂线,且交点于B点.
A点: X = 0.0000 Y = 1.0000 Z = 0.0000
B点: X = 2.0000 Y = 3.0000 Z = 0.0000
要求通过解析几何算法,求C点坐标, (通过作图得出C点坐标为 X = 2.7071 Y = 2.2929 Z = 0.0000)
您需要 登录 才可以下载或查看,没有账号?注册
使用道具 举报
找到解法了
已知Kab=1.7 那么Kbc=-1/Kab=-.588235294117647 再用x^2+y^2=R^2公式推导 x = r/sqrt(1+Kbc^2) y = r/ sqrt ( 1+ (1/Kbc)^2) 调试通过的程序如下: Sub LSs() Dim Aa(2) As Variant Aa(0) = Array(10, 33) Aa(1) = Array(20, 50) Dim pp(0 To 2) As Double, ppp(0 To 2) As Double Dim kkk As Double Kab = (Aa(1)(1) - Aa(0)(1)) / (Aa(1)(0) - Aa(0)(0)) kkk = -1 / Kab For jj = 0 To 1 pp(jj) = Aa(1)(jj) Next jj ppp(0) = pp(0) + 5 / Sqr(1 + kkk ^ 2) ppp(1) = pp(1) - 5 / Sqr(1 + (1 / kkk) ^ 2) Set ll = ThisDrawing.ModelSpace.AddLine(pp, ppp) ll.color = 1 End Sub
本版积分规则 发表回复 回帖后跳转到最后一页
小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 ) ©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途
GMT+8, 2024-11-24 05:27 , Processed in 0.169523 second(s), 23 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.