|
Post by tsh73 on Apr 7, 2018 20:10:52 GMT
Here's a pattern I've seen pretty often - not really sure where I think on murals in the church, on saints' clothing Today I made a program doing it - but it was in C I probably convert it to JB and post here - but as for now you can consider it to be small programmer's puzzle and try to recreate it.
|
|
|
Post by cundo on Apr 7, 2018 21:04:56 GMT
I see "L's" , a lot of L's !!
|
|
|
Post by B+ on Apr 8, 2018 1:09:06 GMT
Here is a 4x4 Square Tiling System: 'Tile Maker.txt for JB v 2.0 B+ 2018-04-07 nomainwin WindowWidth=600 ' Anatoly's tip WindowHeight=600 open "Ajusting..." for graphics_nf_nsb as #1 #1, "home ; down ; posxy w h" w=600-2*w:h=600-2*h close #1 WindowWidth=600+w WindowHeight=600+h UpperLeftX=(DisplayWidth-WindowWidth)/2 UpperLeftY=(DisplayHeight-WindowHeight)/2 graphicbox #1.g,0,0,WindowWidth+2,WindowHeight+2 open "Tile Maker" for window_nf as #1 #1 "trapclose quit" #1.g "down" for n = 1 to 5 select case n case 1 : pattern$ = "XXoXoooXXoooXoXX" case 2 : pattern$ = "XooXooXooXooXooX" case 3 : pattern$ = "XXXoXoXoXXXoooo" case 4 : pattern$ = "oXooXXXooXooooo" case 5 : pattern$ = "XoXXoooXXoXXXXX" end select side = 600 while side > 8 scan for y = 0 to 600 step side for x = 0 to 600 step side scan call FourByFourTile x, y, pattern$, side next next if side = 600 then call pause 1000 else call pause 200 side = side - 20 wend next wait
sub FourByFourTile x, y, pattern$, side sq = side / 4 for oy = 0 to 3 for ox = 0 to 3 if mid$(pattern$, oy * 4 + ox + 1, 1) = "X" then call hue 255, 255, 255 else call hue 0, 0, 0 call fbox x + ox * sq, y + oy * sq, x + ox * sq + sq, y + oy * sq + sq next next end sub
sub quit h$ close #1 end end sub
sub hue r,g,b 'fore and back #1.g "color ";r;" ";g;" ";b #1.g "backcolor ";r;" ";g;" ";b end sub
sub box x0,y0,x1,y1 #1.g "place ";x0;" ";y0 #1.g "box ";x1;" ";y1 end sub
sub fbox x0,y0,x1,y1 #1.g "place ";x0;" ";y0 #1.g "boxfilled ";x1;" ";y1 end sub
sub pause mil 'tsh version has scan built-in t0 = time$("ms") while time$("ms") < t0 + mil : scan : wend end sub
|
|