pont4 () As Point = {New Point (ax2D, ay2D), New Point (ax6D, ay6D), New Point (ax5D, ay5D), New Point (ax1D, ay1D)}. DrawPolygon ( New Pen (Color.Green, 1), pont4)
pont5 () As Point = {New Point (ax3D, ay3D), New Point (ax7D, ay7D), New Point (ax6D, ay6D), New Point (ax2D, ay2D)}. DrawPolygon ( New Pen (Drawing.Color.Green, 1), pont5)
pont6 () As Point = {New Point (ax8D, ay8D), New Point (ax4D, ay4D), New Point (ax3D, ay3D), New Point (ax7D, ay7D)}. DrawPolygon ( New Pen (Drawing.Color.Green, 1), pont6)
Sub
Sub Button3_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'вправо
()
'координати вершин верхньої межі = -0.5 * CHIR: ay1 = -0.5 * GLUB: az1 = 0.5 * VIC = 0.5 * CHIR: ay2 = -0.5 * GLUB: az2 = 0.5 * VIC = 0.5 * CHIR: ay3 = 0.5 * GLUB: az3 = 0.5 * VIC = -0.5 * CHIR: ay4 = 0.5 * GLUB: az4 = 0.5 * VIC
'координатывершиннижнейграни = -0.5 * CHIR: ay5 = -0.5 * GLUB: az5 = -0.5 * VIC = 0.5 * CHIR: ay6 = -0.5 * GLUB: az6 = -0.5 * VIC = 0.5 * CHIR: ay7 = 0.5 * GLUB: az7 = -0.5 * VIC = -0.5 * CHIR: ay8 = 0.5 * GLUB: az8 = -0.5 * VIC
'обертання вершин навколо Oy
'верхня грань
R = ax1 * Math.Cos (angle) - az1 * Math.Sin (angle) R = ax1 * Math.Sin (angle) + az1 * Math.Cos (angle) R = ay1
R = ax2 * Math.Cos (angle) - az2 * Math.Sin (angle) R = ax2 * Math.Sin (angle) + az2 * Math.Cos (angle) R = ay2
R = ax3 * Math.Cos (angle) - az3 * Math.Sin (angle) R = ax3 * Math.Sin (angle) + az3 * Math.Cos (angle) R = ay3
R = ax4 * Math.Cos (angle) - az4 * Math.Sin (angle) R = ax4 * Math.Sin (angle) + az4 * Math.Cos (angle) R = ay4
'ніжняяграньR = ax5 * Math.Cos (angle) - az5 * Math.Sin (angle) R = ax5 * Math.Sin (angle) + az5 * Math.Cos (angle) R = ay5
R = ax6 * Math.Cos (angle) - az6 * Math.Sin (angle) R = ax6 * Math.Sin (angle) + az6 * Math.Cos (angle) R = ay6
R = ax7 * Math.Cos (angle) - az7 * Math.Sin (angle) R = ax7 * Math.Sin (angle) + az7 * Math.Cos (angle) R = ay7
R = ax8 * Math.Cos (angle) - az8 * Math.Sin (angle) R = ax8 * Math.Sin (angle) + az8 * Math.Cos (angle) R = ay8
'в екранні координати вершінD = cPX + n * ax1R/(z0 + az1R) D = cPY + n * ay1R/(z0 + az1R) D = cPX + n * ax2R/(z0 + az2R ) D = cPY + n * ay2R/(z0 + az2R)
D = cPX + n * ax3R/(z0 + az3R) D = cPY + n * ay3R/(z0 + az3R)
D = cPX + n * ax4R/(z0 + az4R) D = cPY + n * ay4R/(z0 + az4R)
D = cPX + n * ax5R/(z0 + az5R) D = cPY + n * ay5R/(z0 + az5...