if we try to see a pattern using what is like Ulam primes spiral, but checking if Round(R,2)= 0.12 as an example we will see a pattern, change 0.12 to 0.13 and another pattern and so on.
but it appears the same number of its 6 digits such as (0.181763) does not recur at all or we need a super computer to check this.
using example primeNumbers in thinbasic examples:
B=(A+R)^8
R=B-Int(B)
If Round(R,2)=0.12 Then
Canvas_Color(Rgb(0, 255, 255))
Canvas_SetPixel(x/3, y/3)
the purpose of (x/3, y/3) is to compress the graph only
Uses "UI"
'-----------------------------------------------------------
' Global variables
'-----------------------------------------------------------
Dim ScreenWidth As Long = 800
Dim ScreenHeight As Long = 800
Dim t1, t2 As Quad '---For time measuring
Dim i, j As Long '---Loopers
Dim x, y, dots As Long '---
Dim turn As Long = 0 '---
Dim num As Long = 1 '---Prime number starting point
Dim points_per_edge As Long = 1 '---
Dim edgecycle As Long = 0 '---
Dim hWin As DWord '---Handle of the canvas window
'-----------------------------------------------------------
' Main program
'-----------------------------------------------------------
hWin = Canvas_Window("experiments ...", 1, 1, ScreenWidth, ScreenHeight )
Canvas_Attach(hWin, 0, %TRUE) ' <- double buffer
timebeginperiod(1)
'---Start timer
HiResTimer_Init
t1 = HiResTimer_Get
'---Init canvas
Canvas_Clear(%BLACK)
Canvas_Box(1, 1, ScreenWidth-1, ScreenHeight-1, 5, Rgb(255,255, 0))
'---Starting point
x = ScreenWidth / 1
y = ScreenHeight / 1
Global A,B,R As Single
'Global A,B,R As Double'Single
A=4
A=A/3
'---Main Prime number looper
For i = 1 To 3000
Plotting()
Next
'---Ending timer
t2 = HiResTimer_Get
Canvas_SetPos 10, ScreenHeight - 20
Canvas_Color(%WHITE, %BLACK)
Canvas_Print "Time taken: " + Format$((t2 - t1) / 1000000, "#.000") + " second - " + _
dots + " dots drawn. Press a key to continue."
'---A last redraw
Canvas_Redraw
timeendperiod(1)
Canvas_WaitKey
Canvas_Window End
'-----------------------------------------------------------
Sub Plotting()
'-----------------------------------------------------------
B=(A+R)^8
R=B-Int(B)
Static IsTimeToRedraw As Long
Incr IsTimeToRedraw
If Mod(IsTimeToRedraw, 20) = 0 Then Canvas_Redraw
turn += 1
If turn = 5 Then turn = 1
edgecycle += 1
If edgecycle = 3 Then
edgecycle = 1
points_per_edge += 1
'Canvas_Redraw
End If
For j = 1 To points_per_edge
num += 1
Select Case turn
Case 1
x = x + 1
Case 2
y = y - 1
Case 3
x = x - 1
Case 4
y = y + 1
End Select
'If IsPrime(num) Then
If Round(R,2)=0.12 Then
Canvas_Color(Rgb(0, 255, 255))
Canvas_SetPixel(x/3, y/3)
dots += 1
End If
Next
End Sub
Bookmarks