MaxH) Then Sur (ix, 0)=MaxHOffs As Integeriy=1 To Y ()=(- 1) ^ (CInt (2 * Rnd ())) ix=0 To X=Sur ( ix, iy - 1) + Offs (ix, iy)=h (h <0) Then Sur (ix, iy)=0 (h> MaxH) Then Sur (ix, iy)=MaxHIf (RBSyn.Checked) Thenix=0 To X=MaxH * Math.Cos ((ix - SurSize.X / 2) * Math.PI / 50) + MaxH (ix, 0)=h (h <0) Then Sur (ix, 0) =0iy=1 To Y (ix, iy)=Sur (ix, 0) If (RBSyn2.Checked) Thenix=0 To X (ix, 0)=MaxH * Math.Cos ((ix - SurSize.X / 2) * Math.PI / 50) + MaxHOffs As IntegerS0, S1 As Integeriy=1 To Y=MaxH * Math.Cos ((iy - 1) * Math.PI / 50) + MaxH=MaxH * Math.Cos ((iy) * Math.PI / 50) + MaxH=S1 - S0ix=0 To X=Sur (ix, iy - 1) + Offs (ix, iy)=h (h < 0) Then Sur (ix, iy)=0Ifiy=0 To Yix=0 To X.Write (Sur (ix, iy)). Close () закриття файлу .. Close () SubSub RBRnd_CheckedChanged (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RBRnd.CheckedChanged.Text=«RunSuf» + Trim (Str (NUDX.Value)) + «_» + Trim (Str (NUDY.Value)) SubSub RBRndOff_CheckedChanged (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RBRndOff.CheckedChanged.Text=«RunSufOff» + Trim (Str (NUDX.Value)) + «_» + Trim (Str (NUDY.Value)) SubSub RBRndOff2_CheckedChanged (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RBRndOff2.CheckedChanged.Text=«RunSufOff2_» + Trim (Str (NUDX.Value)) + «_» + Trim (Str (NUDY.Value)) SubSub RBRndOff3_CheckedChanged (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RBSyn.CheckedChanged.Text=«Syn» + Trim (Str (NUDX.Value)) + «_» + Trim (Str (NUDY.Value)) SubSub NUDX_ValueChanged (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NUDX.ValueChanged, NUDY.ValueChangedtext As String=«RunSuf» (RBRndOff.Checked) Then text= text + «Off» (RBRndOff2.Checked) Then text=text + «Off2_» (RBRndOff3.Checked) Then text=text + «Off3_» (RBSyn.Checked) Then text=«Syn» (RBSyn2.Checked ) Then text=«Syn2_»=text + Trim (Str (NUDX.Value)) + «_» + Trim (Str (NUDY.Value)). Text=textSubSub RBRndOff3_CheckedChanged_1 (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RBRndOff3.CheckedChanged.Text=«RunSufOff3_» + Trim (Str (NUDX.Value)) + «_» + Trim (Str (NUDY.Value)) SubSub RBSyn2_CheckedChanged (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RBSyn2.CheckedChanged.Text=«Syn2_» + Trim (Str (NUDX.Value)) + «_» + Trim (Str (NUDY.Value)) SubSub Button9_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click () () () () SubClass
Додаток Б
Лістинг модуля «Rendering.vb»SystemSystem.DrawingSystem.Windows.FormsMicrosoft.DirectXMicrosoft.DirectX.Direct3DDirect3D =Microsoft.DirectX.Direct3DMyarClass renderingForm
«Глобальні змінні для модуляdevice As Device=Nothing наше 3D устройствоvertexBuffer As VertexBuffer=Nothing» робоча поверхностьvertexBuffer2 As VertexBuffer=Nothing «стіна, полtexture As Texture=Nothing» робоча поверхностьtexturefloor As Texture=Nothing «стіна, полtexturecamera As Texture=Nothing» текстура камериtextureM As Texture=Nothing «уявна поверхностьvertexBufferM As VertexBuffer=Nothing» уявна поверхностьpresentParams As New PresentParameters () «параметри для 3D pause As Boolean=Falsemx As Integer=120» Кількість точок по Xkol_y As Integer=90 «Кількість точок по Ymx2 As Integer=6my2 As Integer=6RA, RC, RB As Single» Точка обзораmmn As New Options () 'Створюємо вікно Options nv As IntegerconeMesh As Mesh=Nothing Кам...