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


Pulsar Star Galaxy Rotation
05-29-2017, 05:22 PM
Post: #1
 (Print Post)
Pulsar Star Galaxy Rotation
To boldly see what no man has seen before!

Code Snippet: [Select]
' Pulsar star galaxy rotation.bas SmallBASIC 0.12.9 (B+=MGA) 2017-05-30

'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
'
'   CAUTION: DO NOT RUN THIS CODE IF YOU ARE SUSCEPTIBLE to SEIZURES
'
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

sr = 10 : cx = xmax/2 : cy = ymax/2 : b = 1 : bdir = 1
rr = rnd : gg = rnd : bb = rnd
while 1
 cls
 nstars = 1 : starN = 1
 for s = 1 to sr step 3
   color rgb(rnd*255, rnd*255, rnd *255)
   star cx, cy, .1*s, s, 5, deg(a)*20
 next
 rr = 2 * sr
 while nstars < 1000
   circ = 2 * pi * rr
   n = int(circ / (2*sr))
   clr++
   color rgb(127+127*sin(clr*rr), 127+127*sin(clr*gg), 127+127*sin(clr*bb))
   for i = 1 to n
     x = cx + b*rr*cos(i * 2*pi/n + a)
     y = cy + 1/b*rr*sin(i * 2*pi/n + a)
     star x, y, .1*sr, .8*sr, 5, deg(a)*20
   next
   nstars = nstars + n
   rr = rr + 2 * sr
 wend
 showpage
 a = a + pi/90
 b = b + .01 * bdir
 if b > 2.5  then bdir = bdir * -1 : b = 2.5
 if b < .2 then bdir = bdir * -1 : rr = rnd : gg = rnd : bb = rnd : b = .2
wend

sub star( x, y, rInner, rOuter, nPoints, angleOffset)
 local pAngle, radAngleOffset, i, x1, y1, x2, y2, x3, y3
 ' x, y are same as for circle,
 ' rInner is center circle radius
 ' rOuter is the outer most point of star
 ' nPoints is the number of points,
 ' angleOffset = angle offset IN DEGREES, it will be converted to radians in sub
 ' this is to allow us to spin the polygon of n sides
 pAngle = RAD(360 / nPoints)  :  radAngleOffset = RAD(angleOffset)
 x1 = x + rInner * cos(radAngleOffset)
 y1 = y + rInner * sin(radAngleOffset)
 for i = 0 to nPoints - 1
   x2 = x + rOuter * cos(i * pAngle + radAngleOffset + .5 * pAngle)
   y2 = y + rOuter * sin(i * pAngle + radAngleOffset + .5 * pAngle)
   x3 = x + rInner * cos((i + 1) * pAngle + radAngleOffset)
   y3 = y + rInner * sin((i + 1) * pAngle + radAngleOffset)
   line x1, y1, x2, y2
   line x2, y2, x3, y3
   x1 = x3 : y1 = y3
 next
end sub

Heh, heh... the screen shots look harmless enough...

(Oh man! I have such a headache!)


Attached File(s) Image(s)
       

B += _
Find all posts by this user
Like Post
The following 1 user Likes bplus's post:
Aurel
05-29-2017, 05:36 PM
Post: #2
 (Print Post)
RE: Pulsar Star Galaxy Rotation
Hey Mark ...or to say D.I.S.C.O marco
cool ,,, Wink

basicPro forum:
http://basicpro.mipropia.com/smf/index.php
EU Radioboard forum:
http://euradioboard.createmybb3.com/index.php
AurelSoft main site:
http://aurelsoft.ucoz.com
Find all posts by this user
Like Post
05-29-2017, 06:07 PM (This post was last modified: 05-29-2017 06:10 PM by bplus.)
Post: #3
 (Print Post)
RE: Pulsar Star Galaxy Rotation
Johnno says NOT technically a pulsar.

Yeah, that is only one star. HERE is a Galaxy acting as one! (pulsar)

Mother Nature is going to have to catch up with me Wink


Attached File(s) Image(s)
   

B += _
Find all posts by this user
Like Post



Forum Jump:


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




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