Лабораторная работа: Greating 3D-Graphics on visual basic

'the Y axis)

'**********************************************************

For i = 0 To Sides (0). NumPoints

YSides (j). NumPoints = Sides (0). NumPoints

YSides (j). Points (i). X = Sides (j). Points (i). X * CosAng (Angle) + Sides (j). Points (i). Z * SinAng (Angle) 'new x value

YSides (j). Points (i). Y = Sides (j). Points (i). Y 'new y value

YSides (j). Points (i). Z = Sides (j). Points (i). Z * CosAng (Angle) - Sides (j). Points (i). X * SinAng (Angle) 'new z value

YSides (j). Normal. X = Sides (j). Normal. X * CosAng (Angle) + Sides (j). Normal. Z * SinAng (Angle) 'new x value

YSides (j). Normal. Y = Sides (j). Normal. Y 'new y value

YSides (j). Normal. Z = Sides (j). Normal. Z * CosAng (Angle) - Sides (j). Normal. X * SinAng (Angle) 'new z value

Next i

'check to see if plane is visible if so draw it

If VisiblePlane (YSides (j), 0, 0, 1000) Then

'Draw lines in front right to left rotation view

DrawShape YSides (j), PicFRL, "FRONT"

End If

If VisiblePlane (YSides (j), 0, 1000, 0) Then

'Draw lines in top right to left rotation view

DrawShape YSides (j), PicTop, "TOP"

End If

'**********************************************************

'draw the points for a sideways rotation (rotation around

'the Z axis)

'**********************************************************

'Remove comments to do calculation

'Rotate Z direction

'For i = 0 To Sides (0). NumPoints

' ZSides (j). NumPoints = Sides (0). NumPoints

' ZSides (j). Points (i). X = Sides (j). Points (i). X * CosAng (Angle) + Sides (j). Points (i). Y * SinAng (Angle) 'new x value

К-во Просмотров: 288
Бесплатно скачать Лабораторная работа: Greating 3D-Graphics on visual basic