, Visual C#



34.1. Form1_Load.

' :

Private Const x_focus As Double = 0

Private Const y_focus As Double = 0

Private Const z_focus As Double = 0

' E ( Eye):

Private r_Eye As Single

Private phi_Eye As Single

Private theta_Eye As Single

' ( )

'( ):

Private Const pi As Double = Math.PI

Private MatrixProjection(4, 4) As Single

Private Tetrahedron As Integer

Private Cube As Integer

Private Octahedron As Integer

Private Dodecahedron As Integer

Private Icosahedron_first As Integer

Private Icosahedron_last As Integer

'

'(parallel projection) :

Private Const ParallelProjection As Integer = 0

'

'(perspective projection) :

Private Const PerspectiveProjection As Integer = 1

 

Private Sub Form1_Load(ByVal sender As System.Object, _

ByVal e As EventArgs) Handles MyBase.Load

' , :

r_Eye = 4 : phi_Eye = 0.05 * pi : theta_Eye = 0.3 * pi

' ,

' type_of_projection = PerspectiveProjection

'(

'PerspectiveProjection ParallelProjection):

Projection(MatrixProjection, PerspectiveProjection, _

r_Eye, phi_Eye, theta_Eye, _

x_focus, y_focus, z_focus, 0, 1, 0)

' :

alculateParameters()

' PictureBox1 Bitmap:

PictureBox1.Image = New Bitmap(PictureBox1.Width, _

PictureBox1.Height)

' PictureBox1 :




- -  - -  - -