You are not logged in or registered. Please login or register to use the full functionality of this board...
SIGN IN Join Our Community For FREE


graphical presentation of prime numbers
09-17-2017, 02:55 PM
Post: #1
 (Print Post)
graphical presentation of prime numbers
Code Snippet: [Select]
Declare Sub plot(start As Integer, range As Integer)
Dim As Integer i,x,y,j,k,c,p,np
Const pi As Double = 4 * Atn(1)
ScreenRes 800,200
Window (0,0)-(800,200)
Line (0,100)-(800,100)
For x = 1 To 800
    y=2
    If x Mod 5 = 0 Then y=5
    If x Mod 10 = 0 Then y=10
    If x Mod 50 = 0 Then y=15
    If x Mod 100 = 0 Then
        y=20
        Draw String (x,160),LTrim(Str(x))
    EndIf
    Line (x,100-y)-(x,y+100)
Next
Sleep 1000
For i=800 To 100 Step -2
    Window (0,0)-(i,200)
    ScreenLock
    Cls
    Line (0,100)-(800,100)
    For x = 1 To i
        y=2
        If x Mod 100 = 0 Then
            y=25
            Draw String (x,160),LTrim(Str(x))
        Else
            If x Mod 50 = 0 Then
                y=15
                Draw String (x,150),LTrim(Str(x))
            Else
                If x Mod 10 = 0 Then
                    y=10
                    'Draw String (x,140),LTrim(Str(x))
                Else
                    If x Mod 5 = 0 Then
                        y=5
                        'Draw String (x,130),LTrim(Str(x))
                    EndIf
                EndIf
            EndIf
        EndIf
        Line (x,100-y)-(x,y+100)
    Next
    ScreenUnLock
    Sleep 20
Next
Sleep 1000
For i=0 To 50
    Window (i,0)-(i+100,200)
    ScreenLock
    Cls
    Line (0,100)-(800,100)
    For x = i To i+100
        y=2
        If x Mod 100 = 0 Then
            y=25
            Draw String (x,160),LTrim(Str(x))
        Else
            If x Mod 50 = 0 Then
                y=15
                Draw String (x,150),LTrim(Str(x))
            Else
                If x Mod 10 = 0 Then
                    y=10
                    Draw String (x,140),LTrim(Str(x))
                Else
                    If x Mod 5 = 0 Then
                        y=5
                        Draw String (x,130),LTrim(Str(x))
                    EndIf
                EndIf
            EndIf
        EndIf
        Line (x,100-y)-(x,y+100)
    Next
    ScreenUnLock
    Sleep 50
Next
Sleep 1000
For i=50 To 0 Step -1
    Window (i,0)-(i+100,200)
    ScreenLock
    Cls
    Line (0,100)-(800,100)
    For x = i To i+100
        y=2
        If x Mod 100 = 0 Then
            y=25
            Draw String (x,160),LTrim(Str(x))
        Else
            If x Mod 50 = 0 Then
                y=15
                Draw String (x,150),LTrim(Str(x))
            Else
                If x Mod 10 = 0 Then
                    y=10
                    Draw String (x,140),LTrim(Str(x))
                Else
                    If x Mod 5 = 0 Then
                        y=5
                        Draw String (x,130),LTrim(Str(x))
                    EndIf
                EndIf
            EndIf
        EndIf
        Line (x,100-y)-(x,y+100)
    Next
    ScreenUnLock
    Sleep 1
Next
Sleep 1000
For i=100 To 50 Step -2
    Window (0,0)-(i,200)
    ScreenLock
    Cls
    Line (0,100)-(800,100)
    For x = 1 To i
        y=2
        If x Mod 100 = 0 Then
            y=25
            Draw String (x,160),LTrim(Str(x))
        Else
            If x Mod 50 = 0 Then
                y=15
                Draw String (x,150),LTrim(Str(x))
            Else
                If x Mod 10 = 0 Then
                    y=10
                    Draw String (x,140),LTrim(Str(x))
                Else
                    If x Mod 5 = 0 Then
                        y=5
                        Draw String (x,130),LTrim(Str(x))
                    EndIf
                EndIf
            EndIf
        EndIf
        Line (x,100-y)-(x,y+100)
    Next
    ScreenUnLock
    Sleep 20
Next
Sleep 1000
plot(0,50)
Sleep 1000
For i=0 To 100 Step 2
    Window (0,0)-(i,200)
    ScreenLock
    Cls
    Line (0,100)-(800,100)
    For x = 1 To i
        y=2
        If x Mod 100 = 0 Then
            y=25
            Draw String (x,160),LTrim(Str(x))
        Else
            If x Mod 50 = 0 Then
                y=15
                Draw String (x,150),LTrim(Str(x))
            Else
                If x Mod 10 = 0 Then
                    y=10
                    Draw String (x,140),LTrim(Str(x))
                Else
                    If x Mod 5 = 0 Then
                        y=5
                        Draw String (x,130),LTrim(Str(x))
                    EndIf
                EndIf
            EndIf
        EndIf
        Line (x,100-y)-(x,y+100)
    Next
    ScreenUnLock
    Sleep 20
Next
plot(0,100)

Sleep
End


Sub plot(start As Integer, range As Integer)
    Dim As Double i,x1,y1,x2,y2
    Dim As Integer angle
    For i=3 To range Step 4
        For angle=180 To 15 Step -15
            x1=i+cos(angle*pi/180)*1
            y1=100+sin(angle*pi/180)*(1*800/range)
            x2=i+cos((angle-15)*pi/180)*1
            y2=100+sin((angle-15)*pi/180)*(1*800/range)
            Line(x1,y1)-(x2,y2),14
            Sleep 1
        Next
        For angle=180 To 345 Step 15
            x1=(i+2)+cos(angle*pi/180)*1
            y1=100+sin(angle*pi/180)*(1*800/range)
            x2=(i+2)+cos((angle+15)*pi/180)*1
            y2=100+sin((angle+15)*pi/180)*(1*800/range)
            Line(x1,y1)-(x2,y2),14
            Sleep 1
        Next
    Next
    For i=4.5 To range Step 6
        For angle=180 To 15 Step -15
            x1=i+cos(angle*pi/180)*1.5
            y1=100+sin(angle*pi/180)*(1.5*800/range)
            x2=i+cos((angle-15)*pi/180)*1.5
            y2=100+sin((angle-15)*pi/180)*(1.5*800/range)
            Line(x1,y1)-(x2,y2),13
            Sleep 1
        Next
        For angle=180 To 345 Step 15
            x1=(i+3)+cos(angle*pi/180)*1.5
            y1=100+sin(angle*pi/180)*(1.5*800/range)
            x2=(i+3)+cos((angle+15)*pi/180)*1.5
            y2=100+sin((angle+15)*pi/180)*(1.5*800/range)
            Line(x1,y1)-(x2,y2),13
            Sleep 1
        Next
    Next
    For i=7.5 To range Step 10
        For angle=180 To 15 Step -15
            x1=i+cos(angle*pi/180)*2.5
            y1=100+sin(angle*pi/180)*(2.5*800/range)
            x2=i+cos((angle-15)*pi/180)*2.5
            y2=100+sin((angle-15)*pi/180)*(2.5*800/range)
            Line(x1,y1)-(x2,y2),12
            Sleep 1
        Next
        For angle=180 To 345 Step 15
            x1=(i+5)+cos(angle*pi/180)*2.5
            y1=100+sin(angle*pi/180)*(2.5*800/range)
            x2=(i+5)+cos((angle+15)*pi/180)*2.5
            y2=100+sin((angle+15)*pi/180)*(2.5*800/range)
            Line(x1,y1)-(x2,y2),12
            Sleep 1
        Next
    Next
    For i=10.5 To range Step 14
        For angle=180 To 15 Step -15
            x1=i+cos(angle*pi/180)*3.5
            y1=100+sin(angle*pi/180)*(3.5*800/range)
            x2=i+cos((angle-15)*pi/180)*3.5
            y2=100+sin((angle-15)*pi/180)*(3.5*800/range)
            Line(x1,y1)-(x2,y2),11
            Sleep 1
        Next
        For angle=180 To 345 Step 15
            x1=(i+7)+cos(angle*pi/180)*3.5
            y1=100+sin(angle*pi/180)*(3.5*800/range)
            x2=(i+7)+cos((angle+15)*pi/180)*3.5
            y2=100+sin((angle+15)*pi/180)*(3.5*800/range)
            Line(x1,y1)-(x2,y2),11
            Sleep 1
        Next
    Next
    For i=16.5 To range Step 22
        For angle=180 To 15 Step -15
            x1=i+cos(angle*pi/180)*5.5
            y1=100+sin(angle*pi/180)*(5.5*800/range)
            x2=i+cos((angle-15)*pi/180)*5.5
            y2=100+sin((angle-15)*pi/180)*(5.5*800/range)
            Line(x1,y1)-(x2,y2),10
            Sleep 1
        Next
        For angle=180 To 345 Step 15
            x1=(i+11)+cos(angle*pi/180)*5.5
            y1=100+sin(angle*pi/180)*(5.5*800/range)
            x2=(i+11)+cos((angle+15)*pi/180)*5.5
            y2=100+sin((angle+15)*pi/180)*(5.5*800/range)
            Line(x1,y1)-(x2,y2),10
            Sleep 1
        Next
    Next
    For i=19.5 To range Step 26
        For angle=180 To 15 Step -15
            x1=i+cos(angle*pi/180)*6.5
            y1=100+sin(angle*pi/180)*(6.5*800/range)
            x2=i+cos((angle-15)*pi/180)*6.5
            y2=100+sin((angle-15)*pi/180)*(6.5*800/range)
            Line(x1,y1)-(x2,y2),9
            Sleep 1
        Next
        For angle=180 To 345 Step 15
            x1=(i+13)+cos(angle*pi/180)*6.5
            y1=100+sin(angle*pi/180)*(6.5*800/range)
            x2=(i+13)+cos((angle+15)*pi/180)*6.5
            y2=100+sin((angle+15)*pi/180)*(6.5*800/range)
            Line(x1,y1)-(x2,y2),9
            Sleep 1
        Next
    Next
End Sub


Attached File(s) Image(s)
   
Find all posts by this user
Like Post
09-18-2017, 10:20 AM
Post: #2
 (Print Post)
RE: graphical presentation of prime numbers
The first example demonstrated how prime waves are interwoven.
This example demonstrates the idea of what I call patterns in primorials.
Code Snippet: [Select]
Declare Sub plot(start As Integer, range As Integer)
Declare Sub plot_mod(start As Integer, range As Integer)

Dim As Integer i,x,y,j,k,c,p,np
Const pi As Double = 4 * Atn(1)
ScreenRes 800,200
Do
    If InKey<>"" Then End
    'Window (0,0)-(800,200)
    'Line (0,100)-(800,100)
    'For x = 1 To 800
    '    If InKey<>"" Then End
    '    y=2
    '    If x Mod 5 = 0 Then y=5
    '    If x Mod 10 = 0 Then y=10
    '    If x Mod 50 = 0 Then y=15
    '    If x Mod 100 = 0 Then
    '        y=20
    '        Draw String (x,160),LTrim(Str(x))
    '    EndIf
    '    Line (x,100-y)-(x,y+100)
    'Next
    'Sleep 1000
    'If InKey<>"" Then End
    'For i=800 To 100 Step -2
    '    If InKey<>"" Then End
    '    Window (0,0)-(i,200)
    '    ScreenLock
    '    Cls
    '    Line (0,100)-(800,100)
    '    For x = 1 To i
    '        y=2
    '        If x Mod 100 = 0 Then
    '            y=25
    '            Draw String (x,160),LTrim(Str(x))
    '        Else
    '            If x Mod 50 = 0 Then
    '                y=15
    '                Draw String (x,150),LTrim(Str(x))
    '            Else
    '                If x Mod 10 = 0 Then
    '                    y=10
    '                    'Draw String (x,140),LTrim(Str(x))
    '                Else
    '                    If x Mod 5 = 0 Then
    '                    y=5
    '                    'Draw String (x,130),LTrim(Str(x))
    '                    EndIf
    '                EndIf
    '            EndIf
    '        EndIf
    '        Line (x,100-y)-(x,y+100)
    '    Next
    '    ScreenUnLock
    '    Sleep 20
    'Next
    'Sleep 1000
    'If InKey<>"" Then End
    'For i=0 To 50
    '    If InKey<>"" Then End
    '    Window (i,0)-(i+100,200)
    '    ScreenLock
    '    Cls
    '    Line (0,100)-(800,100)
    '    For x = i To i+100
    '        y=2
    '        If x Mod 100 = 0 Then
    '            y=25
    '            Draw String (x,160),LTrim(Str(x))
    '        Else
    '            If x Mod 50 = 0 Then
    '                y=15
    '                Draw String (x,150),LTrim(Str(x))
    '            Else
    '                If x Mod 10 = 0 Then
    '                    y=10
    '                    Draw String (x,140),LTrim(Str(x))
    '                Else
    '                    If x Mod 5 = 0 Then
    '                    y=5
    '                    Draw String (x,130),LTrim(Str(x))
    '                    EndIf
    '                EndIf
    '            EndIf
    '        EndIf
    '        Line (x,100-y)-(x,y+100)
    '    Next
    '    ScreenUnLock
    '    Sleep 50
    'Next
    'Sleep 1000
    'If InKey<>"" Then End
    For i=50 To 0 Step -1
        If InKey<>"" Then End
        Window (i,0)-(i+100,200)
        ScreenLock
        Cls
        Line (0,100)-(800,100)
        For x = i To i+100
            y=2
            If x Mod 100 = 0 Then
                y=25
                Draw String (x,160),LTrim(Str(x))
            Else
                If x Mod 50 = 0 Then
                    y=15
                    Draw String (x,150),LTrim(Str(x))
                Else
                    If x Mod 10 = 0 Then
                        y=10
                        Draw String (x,140),LTrim(Str(x))
                    Else
                        If x Mod 5 = 0 Then
                            y=5
                            Draw String (x,130),LTrim(Str(x))
                        EndIf
                    EndIf
                EndIf
            EndIf
            Line (x,100-y)-(x,y+100)
        Next
        ScreenUnLock
        Sleep 1
    Next
    Sleep 1000
    If InKey<>"" Then End
    For i=100 To 50 Step -2
        If InKey<>"" Then End
        Window (0,0)-(i,200)
        ScreenLock
        Cls
        Line (0,100)-(800,100)
        For x = 1 To i
            y=2
            If x Mod 100 = 0 Then
                y=25
                Draw String (x,160),LTrim(Str(x))
            Else
                If x Mod 50 = 0 Then
                    y=15
                    Draw String (x,150),LTrim(Str(x))
                Else
                    If x Mod 10 = 0 Then
                        y=10
                        Draw String (x,140),LTrim(Str(x))
                    Else
                        If x Mod 5 = 0 Then
                            y=5
                            Draw String (x,130),LTrim(Str(x))
                        EndIf
                    EndIf
                EndIf
            EndIf
            Line (x,100-y)-(x,y+100)
        Next
        ScreenUnLock
        Sleep 20
    Next
    Sleep 1000
    If InKey<>"" Then End
    plot(0,50)
    Sleep 1000
    If InKey<>"" Then End
    For i=0 To 100 Step 2
        If InKey<>"" Then End
        Window (0,0)-(i,200)
        ScreenLock
        Cls
        Line (0,100)-(800,100)
        For x = 1 To i
            y=2
            If x Mod 100 = 0 Then
                y=25
                Draw String (x,160),LTrim(Str(x))
            Else
                If x Mod 50 = 0 Then
                    y=15
                    Draw String (x,150),LTrim(Str(x))
                Else
                    If x Mod 10 = 0 Then
                        y=10
                        Draw String (x,140),LTrim(Str(x))
                    Else
                        If x Mod 5 = 0 Then
                            y=5
                            Draw String (x,130),LTrim(Str(x))
                        EndIf
                    EndIf
                EndIf
            EndIf
            Line (x,100-y)-(x,y+100)
        Next
        ScreenUnLock
        Sleep 20
    Next
    plot(0,100)
    Sleep 1000
    If InKey<>"" Then End
    For i=0 To 100 Step 2
        If InKey<>"" Then End
        Window (0,0)-(i,200)
        ScreenLock
        Cls
        Line (0,100)-(800,100)
        For x = 1 To i
            y=2
            If x Mod 100 = 0 Then
                y=25
                Draw String (x,160),LTrim(Str(x))
            Else
                If x Mod 50 = 0 Then
                    y=15
                    Draw String (x,150),LTrim(Str(x))
                Else
                    If x Mod 10 = 0 Then
                        y=10
                        Draw String (x,140),LTrim(Str(x))
                    Else
                        If x Mod 5 = 0 Then
                            y=5
                            'Draw String (x,130),LTrim(Str(x))
                        EndIf
                    EndIf
                EndIf
            EndIf
            Line (x,100-y)-(x,y+100)
        Next
        ScreenUnLock
        Sleep 10
    Next
    plot_mod(0,100)
    Sleep 1000
    If InKey<>"" Then End
    For i=0 To 185 Step 2
        If InKey<>"" Then End
        Window (0,0)-(i,200)
        ScreenLock
        Cls
        Line (0,100)-(800,100)
        For x = 1 To i
            y=2
            If x Mod 100 = 0 Then
                y=25
                Draw String (x,160),LTrim(Str(x))
            Else
                If x Mod 50 = 0 Then
                    y=15
                    Draw String (x,150),LTrim(Str(x))
                Else
                    If x Mod 10 = 0 Then
                        y=10
                        Draw String (x,140),LTrim(Str(x))
                    Else
                        If x Mod 5 = 0 Then
                            y=5
                            'Draw String (x,130),LTrim(Str(x))
                        EndIf
                    EndIf
                EndIf
            EndIf
            Line (x,100-y)-(x,y+100)
        Next
        ScreenUnLock
        Sleep 10
    Next
    plot_mod(0,185)
Loop

End


Sub plot(start As Integer, range As Integer)
    Dim As Double i,x1,y1,x2,y2
    Dim As Integer angle
    '2
    For i=3 To range Step 4
        If InKey<>"" Then End
        For angle=180 To 15 Step -15
            x1=i+cos(angle*pi/180)*1
            y1=100+sin(angle*pi/180)*(1*800/range)
            x2=i+cos((angle-15)*pi/180)*1
            y2=100+sin((angle-15)*pi/180)*(1*800/range)
            Line(x1,y1)-(x2,y2),14
            'Sleep 1
        Next
        For angle=180 To 345 Step 15
            x1=(i+2)+cos(angle*pi/180)*1
            y1=100+sin(angle*pi/180)*(1*800/range)
            x2=(i+2)+cos((angle+15)*pi/180)*1
            y2=100+sin((angle+15)*pi/180)*(1*800/range)
            Line(x1,y1)-(x2,y2),14
            'Sleep 1
        Next
    Next
    
    '3
    For i=4.5 To range Step 6
        If InKey<>"" Then End
        For angle=180 To 15 Step -15
            x1=i+cos(angle*pi/180)*1.5
            y1=100+sin(angle*pi/180)*(1.5*800/range)
            x2=i+cos((angle-15)*pi/180)*1.5
            y2=100+sin((angle-15)*pi/180)*(1.5*800/range)
            Line(x1,y1)-(x2,y2),13
            Sleep 1
        Next
        For angle=180 To 345 Step 15
            x1=(i+3)+cos(angle*pi/180)*1.5
            y1=100+sin(angle*pi/180)*(1.5*800/range)
            x2=(i+3)+cos((angle+15)*pi/180)*1.5
            y2=100+sin((angle+15)*pi/180)*(1.5*800/range)
            Line(x1,y1)-(x2,y2),13
            'Sleep 1
        Next
    Next
    
    '5
    For i=7.5 To range Step 10
        If InKey<>"" Then End
        For angle=180 To 15 Step -15
            x1=i+cos(angle*pi/180)*2.5
            y1=100+sin(angle*pi/180)*(2.5*800/range)
            x2=i+cos((angle-15)*pi/180)*2.5
            y2=100+sin((angle-15)*pi/180)*(2.5*800/range)
            Line(x1,y1)-(x2,y2),12
            Sleep 1
        Next
        For angle=180 To 345 Step 15
            x1=(i+5)+cos(angle*pi/180)*2.5
            y1=100+sin(angle*pi/180)*(2.5*800/range)
            x2=(i+5)+cos((angle+15)*pi/180)*2.5
            y2=100+sin((angle+15)*pi/180)*(2.5*800/range)
            Line(x1,y1)-(x2,y2),12
            'Sleep 1
        Next
    Next
    
    '7
    For i=10.5 To range Step 14
        If InKey<>"" Then End
        For angle=180 To 15 Step -15
            x1=i+cos(angle*pi/180)*3.5
            y1=100+sin(angle*pi/180)*(3.5*800/range)
            x2=i+cos((angle-15)*pi/180)*3.5
            y2=100+sin((angle-15)*pi/180)*(3.5*800/range)
            Line(x1,y1)-(x2,y2),11
            Sleep 1
        Next
        For angle=180 To 345 Step 15
            x1=(i+7)+cos(angle*pi/180)*3.5
            y1=100+sin(angle*pi/180)*(3.5*800/range)
            x2=(i+7)+cos((angle+15)*pi/180)*3.5
            y2=100+sin((angle+15)*pi/180)*(3.5*800/range)
            Line(x1,y1)-(x2,y2),11
            'Sleep 1
        Next
    Next
    
    '11
    For i=16.5 To range Step 22
        If InKey<>"" Then End
        For angle=180 To 15 Step -15
            x1=i+cos(angle*pi/180)*5.5
            y1=100+sin(angle*pi/180)*(5.5*800/range)
            x2=i+cos((angle-15)*pi/180)*5.5
            y2=100+sin((angle-15)*pi/180)*(5.5*800/range)
            Line(x1,y1)-(x2,y2),10
            Sleep 1
        Next
        For angle=180 To 345 Step 15
            x1=(i+11)+cos(angle*pi/180)*5.5
            y1=100+sin(angle*pi/180)*(5.5*800/range)
            x2=(i+11)+cos((angle+15)*pi/180)*5.5
            y2=100+sin((angle+15)*pi/180)*(5.5*800/range)
            Line(x1,y1)-(x2,y2),10
            'Sleep 1
        Next
    Next
    
    '13
    For i=19.5 To range Step 26
        If InKey<>"" Then End
        For angle=180 To 15 Step -15
            x1=i+cos(angle*pi/180)*6.5
            y1=100+sin(angle*pi/180)*(6.5*800/range)
            x2=i+cos((angle-15)*pi/180)*6.5
            y2=100+sin((angle-15)*pi/180)*(6.5*800/range)
            Line(x1,y1)-(x2,y2),9
            Sleep 1
        Next
        For angle=180 To 345 Step 15
            x1=(i+13)+cos(angle*pi/180)*6.5
            y1=100+sin(angle*pi/180)*(6.5*800/range)
            x2=(i+13)+cos((angle+15)*pi/180)*6.5
            y2=100+sin((angle+15)*pi/180)*(6.5*800/range)
            Line(x1,y1)-(x2,y2),9
            'Sleep 1
        Next
    Next
End Sub


Sub plot_mod(start As Integer, range As Integer)
    Dim As Double i,x1,y1,x2,y2
    Dim As Integer angle
    '2
    For i=3 To range Step 4
        For angle=180 To 15 Step -15
            If InKey<>"" Then End
            x1=i+cos(angle*pi/180)*1
            y1=100+sin(angle*pi/180)*(1*800/range)
            x2=i+cos((angle-15)*pi/180)*1
            y2=100+sin((angle-15)*pi/180)*(1*800/range)
            Line(x1,y1)-(x2,y2),14
            'Sleep 1
        Next
        For angle=180 To 345 Step 15
            x1=(i+2)+cos(angle*pi/180)*1
            y1=100+sin(angle*pi/180)*(1*800/range)
            x2=(i+2)+cos((angle+15)*pi/180)*1
            y2=100+sin((angle+15)*pi/180)*(1*800/range)
            Line(x1,y1)-(x2,y2),14
            'Sleep 1
        Next
    Next
    
    '3
    For i=6 To range Step 12
        If InKey<>"" Then End
        For angle=180 To 15 Step -15
            If InKey<>"" Then End
            x1=i+cos(angle*pi/180)*3
            y1=100+sin(angle*pi/180)*(3*800/range)
            x2=i+cos((angle-15)*pi/180)*3
            y2=100+sin((angle-15)*pi/180)*(3*800/range)
            Line(x1,y1)-(x2,y2),13
            Sleep 20
        Next
        For angle=180 To 345 Step 15
            If InKey<>"" Then End
            x1=(i+6)+cos(angle*pi/180)*3
            y1=100+sin(angle*pi/180)*(3*800/range)
            x2=(i+6)+cos((angle+15)*pi/180)*3
            y2=100+sin((angle+15)*pi/180)*(3*800/range)
            Line(x1,y1)-(x2,y2),13
            Sleep 20
        Next
    Next
    
    '5
    For i=15 To range Step 30
        If InKey<>"" Then End
        For angle=180 To 10 Step -10
            If InKey<>"" Then End
            x1=i+cos(angle*pi/180)*10
            y1=100+sin(angle*pi/180)*(10*800/range)
            x2=i+cos((angle-10)*pi/180)*10
            y2=100+sin((angle-10)*pi/180)*(10*800/range)
            Line(x1,y1)-(x2,y2),12
            Sleep 60
        Next
        For angle=180 To 350 Step 10
            If InKey<>"" Then End
            x1=(i+15)+cos(angle*pi/180)*5
            y1=100+sin(angle*pi/180)*(5*800/range)
            x2=(i+15)+cos((angle+10)*pi/180)*5
            y2=100+sin((angle+10)*pi/180)*(5*800/range)
            Line(x1,y1)-(x2,y2),12
            Sleep 60
        Next
    Next
    
    '7
    For i=28 To range Step 154
        If InKey<>"" Then End
        For angle=180 To 5 Step -5
            If InKey<>"" Then End
            x1=i+cos(angle*pi/180)*21
            y1=100+sin(angle*pi/180)*(21*800/range)
            x2=i+cos((angle-5)*pi/180)*21
            y2=100+sin((angle-5)*pi/180)*(21*800/range)
            Line(x1,y1)-(x2,y2),11
            Sleep 100
        Next
        For angle=180 To 355 Step 5
            If InKey<>"" Then End
            x1=(i+35)+cos(angle*pi/180)*14
            y1=100+sin(angle*pi/180)*(14*800/range)
            x2=(i+35)+cos((angle+5)*pi/180)*14
            y2=100+sin((angle+5)*pi/180)*(14*800/range)
            Line(x1,y1)-(x2,y2),11
            Sleep 100
        Next
        For angle=180 To 0 Step -5
            If InKey<>"" Then End
            x1=(i+56)+cos(angle*pi/180)*7
            y1=100+sin(angle*pi/180)*(7*800/range)
            x2=(i+56)+cos((angle+5)*pi/180)*7
            y2=100+sin((angle+5)*pi/180)*(7*800/range)
            Line(x1,y1)-(x2,y2),11
            Sleep 100
        Next
        For angle=180 To 355 Step 5
            If InKey<>"" Then End
            x1=(i+77)+cos(angle*pi/180)*14
            y1=100+sin(angle*pi/180)*(14*800/range)
            x2=(i+77)+cos((angle+5)*pi/180)*14
            y2=100+sin((angle+5)*pi/180)*(14*800/range)
            Line(x1,y1)-(x2,y2),11
            Sleep 100
        Next
        For angle=180 To 0 Step -5
            If InKey<>"" Then End
            x1=(i+98)+cos(angle*pi/180)*7
            y1=100+sin(angle*pi/180)*(7*800/range)
            x2=(i+98)+cos((angle+5)*pi/180)*7
            y2=100+sin((angle+5)*pi/180)*(7*800/range)
            Line(x1,y1)-(x2,y2),11
            Sleep 100
        Next
        For angle=180 To 355 Step 5
            If InKey<>"" Then End
            x1=(i+119)+cos(angle*pi/180)*14
            y1=100+sin(angle*pi/180)*(14*800/range)
            x2=(i+119)+cos((angle+5)*pi/180)*14
            y2=100+sin((angle+5)*pi/180)*(14*800/range)
            Line(x1,y1)-(x2,y2),11
            Sleep 100
        Next
    Next
    Sleep 3000
End Sub


Attached File(s) Image(s)
   
Find all posts by this user
Like Post
The following 2 users Like owen's post:
easylangs, Jack
09-19-2017, 08:48 PM
Post: #3
 (Print Post)
RE: graphical presentation of prime numbers
this interesting Smile
Find all posts by this user
Like Post



Forum Jump:


User(s) browsing this thread: 1 Guest(s)




QB64 Member Project - Pivot version two
QB64 Member Project - Swirl
QB64 Member Project - Amazon
QB64 Member Project - Exit
QB64 Member Project - Full Color LED Sign
QB64 Member Project - Dakapo
QB64 Member Project - 9 Board
QB64 Member Project - Bowditch curve
QB64 Member Project - Isolation
QB64 Member Project - Rubix's Magic
QB64 Member Project - Red Scrolling LED Sign
QB64 Member Project - Foursight
QB64 Member Project - Othello
QB64 Member Project - Color Triangles
QB64 Member Project - Kings Vallery version two
QB64 Member Project - Quarto
QB64 Member Project - Kobolts Monopoly
QB64 Member Project - Kings Court
QB64 Member Project - Algeria Weather
QB64 Member Project - Domain
QB64 Member Project - Rotating Background
QB64 Member Project - Basic Dithering
QB64 Member Project - Kings Valley verion one
QB64 Member Project - MAPTRIANGLE
QB64 Member Project - Martin Fractals version one
QB64 Member Project - Input
QB64 Member Project - Spiro Roses
QB64 Member Project - STxAxTIC 3D World
QB64 Member Project - Point Blank
QB64 Member Project - Splatter
QB64 Member Project - Blokus
QB64 Member Project - Line Thickness
QB64 Member Project - Color Rotating Text
QB64 Member Project - Spinning Color Wheel
QB64 Member Project - Connect Four
QB64 Member Project - Dreamy Clock
QB64 Member Project - Qubic
QB64 Member Project - Martin Fractals version two
QB64 Member Project - Touche
QB64 Member Project - OpenGL Triangles
QB64 Member Project - RGB Color Wheel
QB64 Member Project - Score 4
QB64 Member Project - ARB Checkers
QB64 Member Project - Martin Fractals version four
QB64 Member Project - Martin Fractals version three
QB64 Member Project - Overboard
QB64 Member Project - Pivet version one
QB64 Member Project - Inside Moves
QB64 Member Project - Sabotage