03-26-2024, 06:33 PM
Metatrons Cube
Code: (Select All)
_Title "Metatrons Cube" ' b+ 2024-03-25
Screen _NewImage(700, 700, 32)
_ScreenMove 300, 40
cx = 350: cy = 350: r = 50
a = _Pi(2 / 6)
Dim ix(5), iy(5), ox(5), oi(5)
For i = 0 To 5
ix(i) = cx + 2 * r * Cos(a * i - _Pi / 2)
iy(i) = cy + 2 * r * Sin(a * i - _Pi / 2)
ox(i) = cx + 4 * r * Cos(a * i - _Pi / 2)
oy(i) = cy + 4 * r * Sin(a * i - _Pi / 2)
Next
Circle (cx, cy), r
For i = 0 To 5
Circle (ix(i), iy(i)), r
For j = 0 To 5
Circle (ox(j), oy(j)), r
If j <> i Then
Line (ix(i), iy(i))-(ix(j), iy(j))
Line (ix(i), iy(i))-(ox(j), oy(j))
Line (ox(i), oy(i))-(ox(j), oy(j))
End If
Next
Next
some animation
Code: (Select All)
_Title "Metatrons Cube 2" ' b+ 2024-03-26
Screen _NewImage(700, 700, 32)
_ScreenMove 300, 40
cx = 350: cy = 350: r = 20
a = _Pi(2 / 6)
Dim ix(5), iy(5), ox(5), oi(5)
For cr = r To 8 * r Step .1
Cls
For i = 0 To 5
ix(i) = cx + 2 * r * Cos(a * i - _Pi / 2)
iy(i) = cy + 2 * r * Sin(a * i - _Pi / 2)
ox(i) = cx + 4 * r * Cos(a * i - _Pi / 2)
oy(i) = cy + 4 * r * Sin(a * i - _Pi / 2)
Next
Circle (cx, cy), cr, &HFF0000FF
Circle (cx, cy), cr - 1, &HFF0000FF
Circle (cx, cy), cr - 2, &HFF0000FF
For i = 0 To 5
Circle (ix(i), iy(i)), cr, &HFFFFFF00
Circle (ix(i), iy(i)), cr - 1, &HFFFFFF00
For j = 0 To 5
Circle (ox(j), oy(j)), cr, &HFFFF0000
If j <> i Then
Line (ix(i), iy(i))-(ix(j), iy(j))
Line (ix(i), iy(i))-(ox(j), oy(j))
Line (ox(i), oy(i))-(ox(j), oy(j))
End If
Next
Next
_Display
_Limit 30
Next
b = b + ...