明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1025|回复: 0

给定一个横坐标,怎么样延长一条曲线,使其得到纵坐标的值?

[复制链接]
发表于 2006-6-8 11:56:00 | 显示全部楼层 |阅读模式

我是新手,大家见笑了~我用vba编转桨式水轮机的特性曲线,如上传的图所示:横坐标634.2于5线没有交点,于是得到0,点就跑到坐标轴外面去了

 zhuansu = TextBox31.Text

For k = 0 To zhuanjiao - 1

For i = 0 To kaidu(k) - 1

For j = 0 To shu(i, k) - 1
n11(i, j) = n(i, j, k)
discharge(i, j) = q11(i, j, k)
kai(i, j) = a0(i, j, k)

Next j

Dim points(0 To 2001) As Double
Dim f As Double
Dim p As Double, q1 As Double


p = 600 / (qmax - qmin)
q1 = 350 / (a0max - a0min)

For l = 0 To shu(i, k) - 1
discharge1(l) = discharge(i, l)
n11a(l) = n11(i, l)
Next l

If n11a(0) <= zhuansu And zhuansu <= n11a(shu(i, k) - 1) Then

'------------------------------------------利用反插值函数求出单位转速对应的单位流量值
   x1(i) = xfactor(discharge1(), n11a(), shu(i, k) - 1, zhuansu, discharge1(0), discharge1(shu(i, k) - 1))
   y1(i) = kai(i, 0)
 
pt1(0) = (x1(i) - qmin) * p
pt1(1) = (kai(i, 0) - a0min) * q1
pt1(2) = 0

Set circleobj = ThisDrawing.ModelSpace.AddCircle(pt1, 2)

End If

Next i
For i = 0 To kaidu(k) - 1

f = (x1(kaidu(k) - 1) - x1(0)) / 1000

 m = 0

For e = 0 To 1000
points(m) = (x1(0) + e * f - qmin) * p
points(m + 1) = (TPspline(x1(), y1(), kaidu(k) - 1, x1(0) + e * f) - a0min) * q1

m = m + 2
Next e
Set plineobj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points)
plineobj.Lineweight = acLnWt040
Next i

pt1(0) = (x1(0) - qmin) * p - 5
pt1(1) = (kai(0, 0) - a0min) * q1 + 8
pt1(2) = 0
x = k + 1
Set textobj = ThisDrawing.ModelSpace.AddText(Str$(x), pt1, 5)

If x1(0) <= xlq(k) <= x1(kaidu(k) - 1) Then

xla(k) = xfactor(y1(), x1(), kaidu(k) - 1, xlq(k), y1(0), y1(kaidu(k) - 1))
End If

If xlq(k) < x1(0)    Then
 ?????????? 
End If

 Next k

这就不会编了,想延长曲线求其交点的横坐标。

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-27 02:26 , Processed in 0.165331 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表