Home
Up

Public Type MULTIPLEX
   xPos    As Long
   yPos    As Long
   Count   As Long
   Shape   As Long
End Type


Function CrackDiamond(Source As String) As MULTIPLEX
Dim xRaw As Long, Mod1 As Long, Mod2 As Long, Results As MULTIPLEX

xRaw = ((Asc(Mid$(Source, 1, 1)) - 32) * 95) + (Asc(Mid$(Source, 2, 1)) - 32)
Mod1 = xRaw - (xRaw Mod 150)
Mod2 = (Mod1 Mod 100)
If Mod1 > 0 Then
   If Mod2 > 0 Then
       Results.Count = (((Int(xRaw / 100) - 1) / 3) * 2) + 1
   Else
       Results.Count = (Int(xRaw / 300) * 2) + 1
   End If
Else

   Results.Count = 1 End If
If
Mod1 > 0 Then
   If
Mod2 > 0 Then
       Results.xPos = (xRaw Mod 150) * 2
   Else
       Results.xPos = (xRaw Mod 100) * 2
   End If
Else

   Results.xPos = xRaw
End If
Results.yPos = ((Asc(Mid$(Source, 3, 1)) - 32) * 95) + (Asc(Mid$(Source, 4, 1)) - 32)
Results.Shape = ((Asc(Mid$(Source, 5, 1)) - 32) * 95) + (Asc(Mid$(Source, 6, 1)) - 32)
CrackDiamond = Results
End Function

Original DS induced Rectangles and Diamonds were using Shape 1, chart below was color edited to show the results of each computation.

Source String:  ) 8 !&H 6 !)X 5 !#; 7 !
Bite xPos yPos Count Shape Color
 ) 8 ! 18 24 1 1 Dark Blue
&H 6 ! 20 22 5 1 Violet
)X 5 ! 22 21 7 1 White
#; 7 ! 24 23 3 1 Black
Source String:  * 6 !$q 5 !#; 7 !
Bite xPos yPos Count Shape Color
 * 6 ! 20 22 1 1 Dark Blue
$q 5 ! 22 21 4 1 Violet
#; 7 ! 24 23 3 1 White
Source String: #9 6 !(! 5 !#; 7 !
Bite xPos yPos Count Shape Color
#9 6 ! 20 22 3 1 Dark Blue
(! 5 ! 22 21 6 1 Violet
#; 7 ! 24 23 3 1 White
Source String: !b 5 !!c 7 !
Bite xPos yPos Count Shape Color
!b 5 ! 22 21 2 1 Dark Blue
!c 7 ! 24 23 2 1 Violet
Source String: (  1 !(! 1 !
Bite xPos yPos Count Shape Color
(  1 ! 20 17 6 1 Dark Blue
(! 1 ! 22 17 6 1 Violet
Source String: $o 3 !$p 3 !$q 3 !
Bite xPos yPos Count Shape Color
$o 3 ! 18 19 4 1 Dark Blue
$p 3 ! 20 19 4 1 Violet
$q 3 ! 22 19 4 1 White
Source String: #6 < !)U : !/t 8 !64 6 !9D 5 !3' 7 !,i 9 !&L ; ! / = !
Bite xPos yPos Count Shape Color
#6 < ! 14 28 3 1 Dark Blue
)U : ! 16 26 7 1 Violet
/t 8 ! 18 24 11 1 White
64 6 ! 20 22 15 1 Black
9D 5 ! 22 21 17 1 Light Blue
3' 7 ! 24 23 13 1 Blush
,i 9 ! 26 25 9 1 Tan
&L ; ! 28 27 5 1 Magenta
 / = ! 30 29 1 1 Red
Source String: !` 4 !!a 4 !!b 4 !
Bite xPos yPos Count Shape Color
!` 4 ! 18 20 2 1 Dark Blue
!a 4 ! 20 20 2 1 Violet
!b 4 ! 22 20 2 1 White
Source String:  ) 5 ! * 5 ! + 5 !
Bite xPos yPos Count Shape Color
 ) 5 ! 18 21 1 1 Dark Blue
 * 5 ! 20 21 1 1 Violet
 + 5 ! 22 21 1 1 White
Source String: #3 6 !)R 4 !/q 2 !4Y 0 !3# / !,e 1 !&H 3 ! + 5 !
Bite xPos yPos Count Shape Color
#3 6 ! 8 22 3 1 Dark Blue
)R 4 ! 10 20 7 1 Violet
/q 2 ! 12 18 11 1 White
4Y 0 ! 14 16 14 1 Black
3# / ! 16 15 13 1 Light Blue
,e 1 ! 18 17 9 1 Blush
&H 3 ! 20 19 5 1 Tan
 + 5 ! 22 21 1 1 Magenta