vb.net怎么做直方图 vb画直线代码

直方图投影 vbVB里一套API支持3D显示 。输入各个点的位置就可以显示了 。非常好用,你可以去
你可以去找一些相关的例子 。
以下是来自
供参考,
VB API 3D图象生成源程序 能实现双眼视觉换算(2008-07-12 20:29:11)标签:杂谈
'一直多年在研究的代码贡献出来,希望有缘的人能发现它.我决定暂时放弃这方面的研究.太伤脑筋了.
'另一个原因是将开发出更符合人工智能的映射模式来取代它
'这是一套镜面虚拟的模式.通过虚拟穿过窗户玻璃上的光线与玻璃的交点来实现的.简单,准确.像进入了一
'面镜子里.其三维形态与宇宙现实空间完全一致.无任何偏差.
'将有助于研究虚拟现实和人工智能和多维空间的人们.因为我就是这方面的爱好者
'源程序下载地址
Private Type BITMAP
bmTypeAs Long
bmWidthAs Long
bmHeightAs Long
bmWidthBytesAs Long
bmPlanesAs Integer
bmBitsPixelAs Integer
bmBitsAs Long
End Type
Private Declare Function GetObject Lib "gdi32" Alias "GetObjectA" (ByVal hObject As Long, ByVal nCount As Long, lpObject As Any) As Long
Private Declare Function GetBitmapBits Lib "gdi32" (ByVal hBitmap As Long, ByVal dwCount As Long, lpBits As Any) As Long
Private Declare Function SetBitmapBits Lib "gdi32" (ByVal hBitmap As Long, ByVal dwCount As Long, lpBits As Any) As Long
Dim PicBits()As Byte, PicInfoAs BITMAP
Dim CntAs Long, BytesPerLineAs Long
Dim xcmj As Double, ycmj As Double, zcmj As Double
Dim xb() As Double, yb() As Double, zb() As Double, tx() As String, clr() As Long
Dim omx As Integer, omy As Integer, pmjx As Double, pmjy As Double, pmjz As Double
Dim s As String, w As Long
Dim xs As Double, pp As Boolean, smu As Boolean, nclr As Long
Dim mj As Double, fmb As Integer
Dim dian As Boolean
Private Sub form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim xstp As Double
Dim ystp As Double
Dim x1 As Double, y1 As Double, z1 As Double
Dim t As Double, u As Double, v As Double
Dim i As Double
xstp = (x - omx) * Val(su): ystp = (y - omy) * Val(su)
If Button = 4 Then
For i = 1 To xs
xb(i) = xb(i) - xstp: If Shift Then yb(i) = yb(i)ystp Else zb(i) = zb(i)ystp
Next i
End If
If Button = 1 Then
xcmj = xcmjxstp / 1000: If Shift Then zcmj = zcmj - ystp / 1000 Else ycmj = ycmj - ystp / 1000
End If
If Button = 2 Or gc Then
If Shift Then
t = (x - omx) * 0.01
Else
v = -(y - omy) * 0.015: u = (x - omx) * 0.01
End If
For i = 1 To xs
x1 = xb(i): y1 = yb(i): z1 = zb(i): xb(i) = x1 * Cos(t) - y1 * Sin(t): yb(i) = x1 * Sin(t)y1 * Cos(t)
x1 = xb(i): y1 = yb(i): z1 = zb(i): xb(i) = x1 * Cos(u) - z1 * Sin(u): zb(i) = x1 * Sin(u)z1 * Cos(u)
x1 = xb(i): y1 = yb(i): z1 = zb(i): yb(i) = y1 * Cos(v) - z1 * Sin(v): zb(i) = y1 * Sin(v)z1 * Cos(v)
Next i
t = 0: u = 0: v = 0
End If
omx = x: omy = y
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
Dim suu As Double
suu = Val(su)
Select Case KeyAscii
Case 97: For i = 1 To xs: xb(i) = xb(i)suu: Next i
Case 100: For i = 1 To xs: xb(i) = xb(i) - suu: Next i
Case 119: For i = 1 To xs: zb(i) = zb(i) - suu: Next i
Case 115: For i = 1 To xs: zb(i) = zb(i)suu: Next i
Case 101: For i = 1 To xs: yb(i) = yb(i) - suu: Next i
Case 99: For i = 1 To xs: yb(i) = yb(i)suu: Next i
Case 13:
Case 102: form_Click
End Select
'Debug.Print KeyAscii
End Sub
Private Sub form_Click()
If dian Then
xs = xs1: xb(xs) = xcmj: yb(xs) = ycmj: zb(xs) = zcmj: clr(xs) = nclr: tx(xs) = "": xss = xs
End If
If xsw Then
xs = xs - 1: wt s: snw = InputBox(s): If snw"" Then s = snw: rd s
End If
End Sub
Private Sub d()
Dim i As Double
Me.Cls: ss = Val(su)
For i = 0 To xs
PsetA xb(i)xmj, yb(i)ymj, zb(i)zmj, clr(i)
Next i
PsetA xcmj, ycmj, zcmj, nclr
Text1 = Str(xcmj)","Str(ycmj)","Str(zcmj)
End Sub
Function PsetA(x1 As Double, y1 As Double, z1 As Double, color As Long)
Dim fmz As Integer
Dim r As Byte, g As Byte, b As Byte, k As Byte
Dim xl As Double, yl As Double, xr As Double, yr As Double
k = 0: r = color Mod 256: g = color \ 256 Mod 256: b = color \ 65536
fmz = mj * fmb
xl = Fix((x1fmz) * pmjz / (z10.001) - fmz - pmjx)
yl = Fix(-y1 * pmjz / (z10.001) - pmjy)
xr = Fix((x1 - fmz) * pmjz / (z10.001)fmz - pmjx)
yr = Fix(-y1 * pmjz / (z10.001) - pmjy)
If z10 And xl1024 And yl768 And xl-1 And yl-1 Then
PicBits(yl * 1024 * 4xl * 4) = k: PicBits(yl * 1024 * 4xl * 41) = b: PicBits(yl * 1024 * 4xl * 42) = g: PicBits(yl * 1024 * 4xl * 43) = r
End If
If z10 And xr1024 And yr768 And xr-1 And yr-1 And smu Then
PicBits(yr * 1024 * 4xr * 4) = k: PicBits(yr * 1024 * 4xr * 41) = b: PicBits(yr * 1024 * 4xr * 42) = g: PicBits(yr * 1024 * 4xr * 43) = r
End If
End Function
Sub See()
SetBitmapBits Me.Image, UBound(PicBits), PicBits(1)
Me.Refresh
End Sub
Private Sub Timer1_Timer()
d
See
ReDim PicBits(0 To BytesPerLine * PicInfo.bmHeight * 3) As Byte
End Sub
Private Sub Form_Load()
s = App.Path"\start.ai"
lo = False
w = 10000
ReDim xb(w) As Double, yb(w) As Double, zb(w) As Double, tx(w) As String, clr(w) As Long
End Sub
Private Sub Form_Resize()
Me.ScaleMode = 3
pmjx = Val(tpx): pmjy = Val(tpy): pmjz = Val(tpz)
zcmj = pmjz
xs = 0
nclr = HFF
fmb = 1
t = 0: u = 0: v = 0
m = 2836.4
cm = 28.364
mj = 82
GetObject Me.Image, Len(PicInfo), PicInfo
BytesPerLine = (PicInfo.bmWidth * 33) And HFFFFFFFC
ReDim PicBits(0 To BytesPerLine * PicInfo.bmHeight * 3) As Byte
End Sub
Sub rd(s)
foo = FreeFile()
Open s For Binary As foo
Get foo, , xb: Get foo, , yb: Get foo, , zb: Get foo, , clr: Get foo, , tx: Get foo, , xs
Close #foo
xss = xs
End Sub
Sub wt(s)
foo = FreeFile()
Open s For Binary As foo
Put foo, , xb: Put foo, , yb: Put foo, , zb: Put foo, , clr: Put foo, , tx: Put foo, , xs
Close #foo
End Sub
Private Sub tmj_Change()
mj = tmj
End Sub
Private Sub tpx_Change()
pmjx = Val(tpx)
End Sub
Private Sub tpy_Change()
pmjy = Val(tpy)
End Sub
Private Sub tpz_Change()
pmjz = Val(tpz)
End Sub
Private Sub Check1_Click()
fm = Check1
fm = (fm * 10.5) * 2
fmb = fm
End Sub
Private Sub O2_Click(Index As Integer)
pp = O2(2)
smu = O2(3)
su.Enabled = O2(0)
su.Locked = Not O2(0)
tmj.Enabled = O2(3)
tmj.Locked = Not O2(3)
Check1_Click
End Sub
Private Sub nera_Click()
ner = nera
End Sub
Private Sub Command1_Click()
wt s
End Sub
Private Sub Command2_Click()
rd s
End Sub
Private Sub p1_Click()
Co.ShowColor
nclr = Co.color
P1.BackColor = nclr
End Sub
Private Sub Command4_Click()
nclr = vbGreen
End Sub
Private Sub Command5_Click()
nclr = vbBlue
End Sub
Private Sub Command6_Click()
If xs1 Then xs = xs - 1
End Sub
Private Sub Check2_Click()
dian = Check2
End Sub
Private Sub Command7_Click()
Unload Me
End Sub
怎么用VB 。net 画直线dim bmp as new bitmap(width,height)dim g as graphics=graphics.fromimage(bmp)g.drawlines(pen.blue,20,20,100,20)backgroundimage=bmp
VB中如何做出直方图 , 散点图?这不叫直方图,这是散点图,可以用picturebox的画线line()或画点pset()来实现 。
VB.net2008 NET 3.5 SP1 , Chart控件的图表类型修改1、检查一下是不是序列的名称不对应vb.net怎么做直方图,进行了修改,不是默认的"Series1"vb.net怎么做直方图;
3、修改正确或是没有错误时可全部重新生成一次看看 。
希望对vb.net怎么做直方图你有帮助,还有疑问请追问或是Hi
VB.net中如何画图?VB.net与VB不同 。
VB.net已经有专门绘图的类 。
可以定义笔刷然后用Drawing类中的方法绘制 。
Private Sub DrawEllipse()
Dim myPen As New System.Drawing.Pen(System.Drawing.Color.Red)
Dim formGraphics as System.Drawing.Graphics
formGraphics = Me.CreateGraphics()
formGraphics.DrawEllipse(myPen, New Rectangle(0,0,200,300))
myPen.Dispose()
formGraphics.Dispose()
End Sub
Private Sub DrawRectangle()
Dim myPen As New System.Drawing.Pen(System.Drawing.Color.Red)
Dim formGraphics as System.Drawing.Graphics
formGraphics = Me.CreateGraphics()
formGraphics.DrawRectangle(myPen, New Rectangle(0,0,200,300))
myPen.Dispose()
formGraphics.Dispose()
End Sub
【vb.net怎么做直方图 vb画直线代码】vb.net怎么做直方图的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于vb画直线代码、vb.net怎么做直方图的信息别忘了在本站进行查找喔 。

    推荐阅读