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 : Aperiodic Monotiles
Author | Message | ||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9131 |
If you have been reading the press you will know about the discovery of aperiodic monotiles. This little program plots the two forms that have been discovered using the coordinates given here Dim r(1)=(1,0) Dim d(1)=(Cos(Rad(60)),-Sin(Rad(60))) Dim u(1)=(Cos(Rad(60)),Sin(Rad(60))) Dim c(1),e(1),f(1) Dim xy(1,12) CLS hat Math scale xy(),MM.HRes/9,xy() For i=0 To 11 Line xy(0,i)+MM.HRes*.6,MM.VRes\2-xy(1,i),xy(0,i+1)+MM.HRes*.6,MM.VRes\2-xy(1,i+1) Circle xy(0,i)+MM.HRes*.6,MM.VRes\2-xy(1,i),3,,,RGB(white),RGB(white) Pause 1000 Next Circle xy(0,12)+MM.HRes*.6,MM.VRes\2-xy(1,12),3,,,RGB(white),RGB(white) Line xy(0,12)+MM.HRes*.6,MM.VRes\2-xy(1,12),xy(0,0)+MM.HRes*.6, MM.VRes\2-xy(1,0) ' Text MM.HRes*0.7,MM.VRes/6,"HAT",C,,MM.HRes/200 Pause 1000 turtle Math scale xy(),MM.HRes/16,xy() For i=0 To 11 Line xy(0,i)+MM.HRes*.1,MM.VRes*.3-xy(1,i),xy(0,i+1)+MM.HRes*.1,MM.VRes*.3-xy(1,i+1) Circle xy(0,i)+MM.HRes*.1,MM.VRes*.3-xy(1,i),3,,,RGB(white),RGB(white) Pause 1000 Next Circle xy(0,12)+MM.HRes*.1,MM.VRes*.3-xy(1,12),3,,,RGB(white),RGB(white) Line xy(0,12)+MM.HRes*.1,MM.VRes*.3-xy(1,12),xy(0,0)+MM.HRes*.1,MM.VRes*.3-xy(1,0) ' Math scale xy(),40,xy() Text MM.HRes*0.2,MM.VRes/6,"TURTLE",C,,MM.HRes/200 Do :Loop ' Sub hat xy(0,0)=0 xy(1,0)=0 ' scale r(),0.5,c() xy(0,1)=c(0) xy(1,1)=c(1) ' xy(0,2)=u(0) xy(1,2)=u(1) ' scale u(),2,c() scale d(),0.5,e() add c(),e(),f() xy(0,3)=f(0) xy(1,3)=f(1) ' add r(),u(),c() xy(0,4)=c(0) xy(1,4)=c(1) ' scale u(),1,c() scale r(),1.5,e() add c(),e(),f() xy(0,5)=f(0) xy(1,5)=f(1) ' scale r(),2,c() xy(0,6)=c(0) xy(1,6)=c(1) ' scale u(),-0.5,c() scale r(),3,e() add c(),e(),f() xy(0,7)=f(0) xy(1,7)=f(1) ' scale r(),2,e() add d(),e(),f() xy(0,8)=f(0) xy(1,8)=f(1) ' add r(),d(),f() xy(0,9)=f(0) xy(1,9)=f(1) ' scale d(),0.5,e() add r(),e(),f() xy(0,10)=f(0) xy(1,10)=f(1) ' xy(0,11)=d(0) xy(1,11)=d(1) ' scale u(),-0.5,c() xy(0,12)=c(0) xy(1,12)=c(1) ' End Sub Sub turtle xy(0,0)=0 xy(1,0)=0 ' xy(0,1)=r(0) xy(1,1)=r(1) ' add r(),d(),c() xy(0,2)=c(0) xy(1,2)=c(1) ' scale r(),3,c() xy(0,3)=c(0) xy(1,3)=c(1) ' scale r(),5,c() scale d(),2,e() add c(),e(),f() xy(0,4)=f(0) xy(1,4)=f(1) ' scale r(),4,c() scale d(),4,e() add c(),e(),f() xy(0,5)=f(0) xy(1,5)=f(1) ' scale r(),3,c() scale d(),4,e() add c(),e(),f() xy(0,6)=f(0) xy(1,6)=f(1) ' scale r(),2,c() scale d(),5,e() add c(),e(),f() xy(0,7)=f(0) xy(1,7)=f(1) ' scale d(),4,e() add r(),e(),f() xy(0,8)=f(0) xy(1,8)=f(1) ' scale r(),-1,c() scale d(),5,e() add c(),e(),f() xy(0,9)=f(0) xy(1,9)=f(1) ' scale r(),-1,c() scale d(),4,e() add c(),e(),f() xy(0,10)=f(0) xy(1,10)=f(1) ' scale d(),3,e() xy(0,11)=e(0) xy(1,11)=e(1) ' scale r(),-1,c() scale d(),2,e() add c(),e(),f() xy(0,12)=f(0) xy(1,12)=f(1) End Sub Sub mul a(),b(),c() c(0)=a(0)*b(0) a(1)=a(1)*b(1) End Sub Sub add a(),b(),c() c(0)=a(0)+b(0) c(1)=a(1)+b(1) End Sub Sub scale a(),b,c() c(0)=a(0)*b c(1)=a(1)*b End Sub Edited 2023-05-06 04:09 by matherp |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
Hi sir, not many replies. Er... don't squares do a better job? Obviously I'm missing your point but psychic abilities fade with age. You must have a point to make .. but what is it? |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6800 |
It's clever stuff, Stan. https://cs.uwaterloo.ca/~csk/hat/ https://aperiodical.com/2023/03/an-aperiodic-monotile-exists/ Edited 2023-05-07 05:46 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
It may be clever but what is the point for say pico users? Is it a polygon fill? The links are interesting but that's all. I'm still missing the point. Your code works pasted into mmedit and ili9341 but what to do?? |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9131 |
Have you ever heard of intellectual curiosity? Everything doesn't need to have a point |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6800 |
It's amazing that you can get a shape to do that. I wonder how many possibilities there are? Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2140 |
The point is almost all tiles produce a repeating pattern. A pair of Penrose tile shapes can cover a surface, without gaps without ever repeating. With just one of the new tile shapes that can be done. The mathematics of proving that you can tile to infinity without ever producing a pattern is impressive. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
does mmbasic have filled polygons or how to make shapes from filled triangles is more relevant. What can it do a square can't? Sorry, I'm an old git. |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2140 |
Squares, rectangles, triangles, hexagons and almost every other shape produce patterns. If you don't want a pattern squares are useless. So far out of countless possible shapes those two shapes are the only ones that will work using just one type of tile. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
If you don't want a pattern squares are useless. chess boards? :) Is there any practical use please for the code? Please explain what the point is about these shapes. The links say little to me. I looked up Tessellation, that's inspiring but still can't see the point of hat shape. I found mmbasic does have filled polygons. |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6800 |
The shapes are a mathematical and topographical curiosity. Whether they will have any practical use is yet to be seen. A chess board is full of patterns. They are everywhere - literally if you expand it to infinity in both directions. An aperiodic monotile is a shape that can be put side by side without leaving gaps, very much like a square, but without forming any patterns, not even when covering an infinite surface. There may be some use in the future, possibly in the arrangement of atoms in new materials, but at the moment they remain a recently discovered curiosity. Making patterns comes naturally to us. We do it all the time. Finding things that refuse to form patterns when we want them to is very interesting. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Plasmamac Guru Joined: 31/01/2019 Location: GermanyPosts: 554 |
Its great Matherp. Plasma |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
It's interesting and worth the google time. over and out on this but thanks for all the fish :) |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3805 |
Various things in mathematics had no practical/useful applications - until they did. E.g. complex numbers. E.g. the realisation that some equations for electrical (R C etc) circuits were like those for air frames. E.g. one-way (trapdoor) functions - yes, they turned out to be useful... in the s of https for example. Maybe these shapes will be useful... maybe not... maths is often about the curiosity and the roads travelled. If it turns out one day to be useful, so much the better. I seem to recall a parallel regarding electricity (what use is it? was the question, basically). Anyway, thanks Peter. John |
||||
Andrew_G Guru Joined: 18/10/2016 Location: AustraliaPosts: 847 |
Peter et al, Thank you for this. Fascinating! It seems to me that there are four 'variants' of the shape i.e. two rotations and two mirrored images. Is there an algorithm for locating and rotating them on screen to progressively fill the screen? (Only an academic interest, as apart from MB4W, I don't have VGA capability.) Cheers, Andrew |
||||
Print this page |