, Visual C#


- 7


DesigningLine(C, H, -A, -D, -H, -B)

Icosahedron_last = NumLines

End Sub

Public Structure Line

' (points):

<VBFixedArray(4)> Dim fr_points() As Single

<VBFixedArray(4)> Dim to_points() As Single

'

'(transformed points):

<VBFixedArray(4)> Dim fr_tr_points() As Single

<VBFixedArray(4)> Dim to_tr_points() As Single

Public Sub Initialize()

ReDim fr_points(4) : ReDim to_points(4)

ReDim fr_tr_points(4) : ReDim to_tr_points(4)

End Sub

End Structure

' Lines Line (

' ' ReDim ):

Public Lines() As Line

' :

Public NumLines As Integer

 

' (x1,y1,z1),(x2,y2,z2):

Public Sub DesigningLine(ByVal x1 As Single, _

ByVal y1 As Single, ByVal z1 As Single, ByVal x2 As Single, _

ByVal y2 As Single, ByVal z2 As Single)

NumLines = NumLines + 1

' Lines Line

' NumLines,

' ReDim Preserve

' :

ReDim Preserve Lines(NumLines)

' :

Lines(NumLines).Initialize()

Lines(NumLines).fr_points(1) = x1

Lines(NumLines).fr_points(2) = y1

Lines(NumLines).fr_points(3) = z1

Lines(NumLines).fr_points(4) = 1

Lines(NumLines).to_points(1) = x2

Lines(NumLines).to_points(2) = y2

Lines(NumLines).to_points(3) = z2

Lines(NumLines).to_points(4) = 1

End Sub

' (translation matrix)

' , MatrixApplyFull.