5 ms·
Drawing hat tiling using Racket
- slowmovintarget 3y agoIt's that Hat. (Polygon that can tile a plain without ever repeating.)
- sillysaurusx 3y agoIndeed. I’ve been seeing it everywhere. The backstory of the Hat is way cool — it was discovered by a hobbyist: https://www.snexplores.org/article/einstein-vampire-tile-shape-math-geometry-pattern-no-repeats https://www.snexplores.org/article/einstein-vampire-tile-sha... Fun fact: if you use it when writing f-hat, g-hat, etc, your equations will all fit together in a visually pleasing way. (But watch out; you’ll never be able to diagonalize them!)
- kubb 3y agoThe code is very clean, much cleaner than it could be in the “top 10” languages. Each of those has one or other repetitive idiosyncratic syntax or constructs that you can’t do away with, and it becomes an endless source of frustration if you’re like me and bang out several thousand lines per week.
- mark_l_watson 3y agoNice!! The Racket code is clean and easy to read. I have never tried doing graphics with Racket but I might try it. (I am currently writing a Racket book: “Practical Artificial Intelligence Development With Racket”. The examples will be very similar to those in my Common Lisp book, but written from scratch in Racket.)
- duck 3y agoLooking forward to that book! Will it be on https://leanpub.com/u/markwatson https://leanpub.com/u/markwatson?
- mark_l_watson 3y agoYes, that is the place. I hope to have the first version released in 4 to 5 weeks.
- gus_massa 3y agoThis is draw using the metapict package. The author of metapict has a nice blog with a lot of examples that you can steal^W use as inspiration. https://soegaard.github.io/blog/metapict/ https://soegaard.github.io/blog/metapict/ (HN discussion https://news.ycombinator.com/item?id=34419998 https://news.ycombinator.com/item?id=34419998 (71 points | by soegaard | 8 months ago | 16 comments))