, Visual C#


         

B As Single


Dim B As Single : Dim C As Single
Dim D As Single : Dim X As Single
Dim Y As Single : Dim y2 As Single
Dim M As Single : Dim N As Single
' :
DesigningLine(0, 0, 0, 0.5, 0, 0) ' x.
DesigningLine(0, 0, 0, 0, 0.5, 0) ' y.
DesigningLine(0, 0, 0, 0, 0, 0.5) ' z.
' (Tetrahedron):
Tetrahedron = NumLines + 1
S = CSng(Sqrt(6))
A = S / CSng(Sqrt(3))
B = -A / 2
C = A * CSng(Sqrt(2)) - 1
D = S / 2
DesigningLine(0, C, 0, A, -1, 0)
DesigningLine(0, C, 0, B, -1, D)
DesigningLine(0, C, 0, B, -1, -D)
DesigningLine(B, -1, -D, B, -1, D)
DesigningLine(B, -1, D, A, -1, 0)
DesigningLine(A, -1, 0, B, -1, -D)
' (Cube):
Cube = NumLines + 1
DesigningLine(-1, -1, -1, -1, 1, -1)
DesigningLine(-1, 1, -1, 1, 1, -1)
DesigningLine(1, 1, -1, 1, -1, -1)
DesigningLine(1, -1, -1, -1, -1, -1)
DesigningLine(-1, -1, 1, -1, 1, 1)
DesigningLine(-1, 1, 1, 1, 1, 1)
DesigningLine(1, 1, 1, 1, -1, 1)
DesigningLine(1, -1, 1, -1, -1, 1)
DesigningLine(-1, -1, -1, -1, -1, 1)
DesigningLine(-1, 1, -1, -1, 1, 1)
DesigningLine(1, 1, -1, 1, 1, 1)
DesigningLine(1, -1, -1, 1, -1, 1)
' (Octahedron):
Octahedron = NumLines + 1
DesigningLine(0, 1, 0, 1, 0, 0)
DesigningLine(0, 1, 0, -1, 0, 0)
DesigningLine(0, 1, 0, 0, 0, 1)
DesigningLine(0, 1, 0, 0, 0, -1)
DesigningLine(0, -1, 0, 1, 0, 0)
DesigningLine(0, -1, 0, -1, 0, 0)
DesigningLine(0, -1, 0, 0, 0, 1)
DesigningLine(0, -1, 0, 0, 0, -1)
DesigningLine(0, 0, 1, 1, 0, 0)
DesigningLine(0, 0, 1, -1, 0, 0)
DesigningLine(0, 0, -1, 1, 0, 0)
DesigningLine(0, 0, -1, -1, 0, 0)
' (Dodecahedron):
Dodecahedron = NumLines + 1