It is currently Sat Mar 25, 2017 6:36 pm



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Lumagrid - colored grid demo
Unread postPosted: Mon Jan 30, 2017 3:19 pm 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 408
I was but a wee child in the 70's, but we had this cool square color organ from a garage sale
that displayed really nice hues..

This morning I decided to make something similar using sine's and GR.MODIFY "paint"

It turned out pretty well. You can tap the screen to choose a new pattern or quit. It does use a WAKELOCK so you probably don't want to leave it running for a long time.

http://laughton.com/basic/programs/othe ... id%20Demo/

Image

Here is a (small) video of it in action on my Samsung J3
https://youtu.be/DIA8tAvvuXg


Report this post
Top
 Profile  
 
 Post subject: Re: Lumagrid - colored grid demo
Unread postPosted: Mon Jan 30, 2017 6:08 pm 
Offline
User avatar

Joined: Wed Jul 10, 2013 8:11 am
Posts: 279
Nice Demo!!

Gregor


Report this post
Top
 Profile  
 
 Post subject: Re: Lumagrid - colored grid demo
Unread postPosted: Tue Jan 31, 2017 1:33 am 
Offline
User avatar

Joined: Mon Aug 18, 2014 1:16 pm
Posts: 1288
Very nice cterp

Roy


Report this post
Top
 Profile  
 
 Post subject: Re: Lumagrid - colored grid demo
Unread postPosted: Tue Jan 31, 2017 5:41 pm 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 408
Actually this is another app that translates quite nicely to smallBasic:

Code:
' Lumagrid by mookiebearapps
'  smallBasic by Microsoft version

GraphicsWindow.BackgroundColor = "White"
GraphicsWindow.Title = "Lumagrid"

sub rnd
n=Math.GetRandomNumber(3)*3+1
if Math.GetRandomNumber(2)<1 then
  n=-n
  EndIf
endsub

w=1024
h=768

bx=60
hh=130
wx=Math.Floor(w/bx)
wy=Math.Floor(h/bx)

again:
ag=0
rnd()
xb=w/n
rnd()
yb=-w/n
rnd()
xr=w/n
rnd()
yr=w/n
rnd()
xg=w/n
rnd()
yg=w/n
GraphicsWindow.Show()

loop:

t=t+1
FOR y=1 TO wy
FOR x=1 TO wx
  xc=x/w
  yc=y/h
  bb=math.Floor(hh*Math.Sin(xb*xc-yb*yc-0.1*t)+1)
  rr=math.Floor(hh*Math.Sin(xr*xc-yr*yc-0.1*t)+1)
  gg=math.Floor(hh*Math.Sin(xg*xc+yg*yc-0.05*t)+1)
  GraphicsWindow.BrushColor = GraphicsWindow.GetColorFromRGB(rr,gg,bb)
  GraphicsWindow.FillRectangle((x-1)*bx,(y-1)*bx,bx,bx)
EndFor
EndFor

st=clock.ElapsedMilliseconds
wait:
x=clock.ElapsedMilliseconds
If x-st < 50 Then
  goto wait
endif
GOTO loop



Report this post
Top
 Profile  
 
 Post subject: Re: Lumagrid - colored grid demo
Unread postPosted: Tue Feb 21, 2017 8:52 am 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 408
I added switches to turn on/off the RGB channels individually.


Report this post
Top
 Profile  
 
 Post subject: Re: Lumagrid - colored grid demo
Unread postPosted: Tue Feb 21, 2017 11:44 am 
Offline
User avatar

Joined: Mon Aug 18, 2014 1:16 pm
Posts: 1288
Nice additions to great demo


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred