Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 00:19 06 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Graphical tiles on your LCDpanel

Author Message
Henk
Newbie

Joined: 06/10/2015
Location: Netherlands
Posts: 20
Posted: 07:09am 07 Nov 2016
Copy link to clipboard 
Print this post

I have made a small program for use on a 320x240 pixels lcdpanel which make beautiful random "tiles". It is based on fractal theorie and it generates incredible images. I show no pictures just use the code and see for yourself. It is very short and gives amazingly detailed graphics. Have fun


'Made by H. Verbeek Netherlands 2016
'Based on TAGAKI mountain
Do
CLS
xm=160:ym=120:a2=Rnd:c=Rnd*20:m=6:n=120:rn=Rnd*150
For i=0 To n
For j=0 To i
x=i/n
y=j/n
z=1-x
For k=0 To m
x1=2^k*x-Int(2^k*x)*rn
y1=2^k*y-Int(2^k*y)*rn
f=Sin(Pi*x1)*Cos(Pi*y1)
z=z+a2^k*f
Next k
col=Int(c*z And 4)*4177920+Int(c*z And 2)*32640+Int(c*z And 1)*254
Pixel xm+i,ym+j,col:Pixel xm-i,ym+j,col:Pixel xm-i,ym-j,col:Pixel xm+i,ym-J,col
Pixel xm+J,ym+I,col:Pixel xm-j,ym+i,col:Pixel xm-j,ym-i,col:Pixel xm+j,ym-i,col
Next j
Next i
Loop
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 01:52am 08 Nov 2016
Copy link to clipboard 
Print this post

Hey, very interesting and very pretty Henk. Nice one.

Greg
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025