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


Moire Flower Clock
05-19-2017, 07:53 AM
Post: #1
 (Print Post)
Moire Flower Clock
Moire Happy Times!

Code Snippet: [Select]
' Moire Flower Clock.bas SmallBASIC 0.12.9 (B+=MGA) 2017-05-19
' The Moire Flower Series Meets Analog clock 2017-04-27 [B+=MGA]
' Public Domain
randomize timer
const x0 = xmax/2
const y0 = ymax/2
const cr = y0/2
d = 1 : n = 12
while 1
 cls
 for i = 1 to n
   cx = x0 + ymax/4*cos(i*2*pi/n-pi/2)
   cy = y0 + ymax/4*sin(i*2*pi/n-pi/2)
   cx2 = x0 + (ymax/4-r)*cos(i*2*pi/n-pi/2)
   cy2 = y0 + (ymax/4-r)*sin(i*2*pi/n-pi/2)
   for a = 0 to ymax/4 step 10
     circle cx, cy, a color rgb(225, 100, 100)
     circle cx2,cy2, a color rgb(128, 0, 40)
   next
 next
 timehms timer, hour, mint, ssec
 hours = hour+(mint/60)
 if ( hours > 12 ) then hours -= 12
 ha  = hours *(2*PI)/12 : drawHand ha, cr * 0.5
 ma  = mint  *(2*PI)/60 : drawHand ma, cr * 0.75
 sa  = ssec  *(2*PI)/60 : drawHand sa, cr
 circle x0, y0, 2, 1, 0
 showpage
 delay 40
 r += d
 if r > ymax/4 then r = ymax/5 : d *= -1
 if r < 0   then r = 0   : d *= -1
wend

sub drawHand(a, r)
 dim h()
 rr = 1/r * 900
 h << x0 + r    * cos(a-pi/2) : h << y0 + r    * sin(a-pi/2)
 h << x0 + rr   * cos(a)      : h << y0 + rr   * sin(a)
 h << x0 + 3*rr * cos(a+pi/2) : h << y0 + 3*rr * sin(a+pi/2)
 h << x0 + rr   * cos(a+pi)   : h << y0 + rr   * sin(a+pi)
 h << x0 + r    * cos(a-pi/2) : h << y0 + r    * sin(a-pi/2)
 color 15 : drawpoly h filled : color 0  : drawpoly h
end


Attached File(s) Image(s)
   

B += _
Find all posts by this user
Like Post
The following 2 users Like bplus's post:
figosdev, Waltersmind (Admin)
05-19-2017, 07:03 PM
Post: #2
 (Print Post)
RE: Moire Flower Clock
thats a great idea. do they move? im pretty sure you could make them move. have an option at the top: anim = 1
Find all posts by this user
Like Post
05-19-2017, 07:35 PM (This post was last modified: 05-19-2017 08:32 PM by bplus.)
Post: #3
 (Print Post)
RE: Moire Flower Clock
Yes, they move for your a moire the moire. ;-))

I pretty much make everything move and screen shots never do justice to my efforts.

What I like best with graphics is the movies (and the plasma). ;D

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



Forum Jump:


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




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