mpercivalxyz

this website!
Log | Files | Refs | README

commit e2c6291cfba7eb09bb256ebef8c239a63856727e
parent ed9eadf4f4a39c16ad5c7e17f8b0ff7e95a742d0
Author: mpizzzle <m@michaelpercival.xyz>
Date:   Sat,  7 Nov 2020 15:15:56 +0000

added note about github project, formatting

Diffstat:
M2020.html | 6++++--
Mblog/penrose-tilings-part-1.html | 7++++---
Mrss.xml | 4+++-
3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/2020.html b/2020.html @@ -35,7 +35,8 @@ <p>Having just moved into a new (tragically empty) flat, I've been inspired to try decorating it with some self created art, and Penrose tiling's beauty in conjunction with their relative ease of computability make them an ideal candidate. The idea I have is to write a program to generate some basic Penrose tilings, where I can then play around with the colour scheme, print out a frame, and paint them by hand in an Escher like style. How is that going to work? Let's find out.</p> <p>The rules for constructing penrose tilings are well documented, <a href="https://tartarus.org/~simon/20110412-penrose/penrose.xhtml">this</a> link in particular explains the iterative process in better detail than I ever could.</p> -<p>The initial starting triangle shares it's geometry with a slice from a decagon (I will refer to this triangle type as 't123'). The easiest way to construct it is to draw a line of length 1, rotate it by π/5 radians with respect to the origin; optionally repeat nine times and you have a decagon. Conveniently (0, 0) is the middle of the screen when it comes to computer graphics, so arranging the triangles around the center is trivial. The simplest method is to start by taking each t123 triangle and dividing it into three sub triangles; you can calculate their geometry by finding two new vertices along the parent t123 triangle using the golden ratio. Doing this correctly you can fit two triangles of type t123 and one of t124 perfectly into the parent t123 triangle, and in a similar manner the rules for dividing t124 triangles is to fit one t123 and one t124. Boom, infinite Penrose tilings. Simple right? Check out the initial decagon and first t123 split below: +<p>The initial starting triangle shares it's geometry with a slice from a decagon (I will refer to this triangle type as 't123'). The easiest way to construct it is to draw a line of length 1, rotate it by π/5 radians with respect to the origin; optionally repeat nine times and you have a decagon. Conveniently (0, 0) is the middle of the screen when it comes to computer graphics, so arranging the triangles around the center is trivial. The simplest method is to start by taking each t123 triangle and dividing it into three sub triangles; you can calculate their geometry by finding two new vertices along the parent t123 triangle using the golden ratio.</p> +<p>Doing this correctly you can fit two triangles of type t123 and one of t124 perfectly into the parent t123 triangle, and in a similar manner the rules for dividing t124 triangles is to fit one t123 and one t124. Boom, infinite Penrose tilings. Simple right? Check out the initial decagon and first t123 split below: <p><img src="blog/assets/pizza.png" alt="" width="400" height="400" /> <img src="blog/assets/more_complicated_pizza.png" alt="" width="400" height="400" /></p> @@ -79,8 +80,9 @@ <img src="blog/assets/p3_four_colour_2.png" alt="" width="400" height="400" /></p> <p>I know there are better and more elegant ways of shading Penrose tilings but I feel happy that I've done what I set out to do, now the hard part is waiting for divine inspiration to kick in before I try and paint one for real.</p> +<p>You can find the code used to generate the images above in my github project <a href="https://github.com/mpizzzle/penrose">here</a>. If you want to compile the program yourself you'll have install the dependencies manually for now; I may take the time to package it with a more modern build tool in the future.</p> <p>Peace out.</p> -<small>Sat, 07 Nov 2020 14:26:36 +0000</small> +<small>Sat, 07 Nov 2020 15:12:13 +0000</small> </div> <div class='entry'> <h2 id='on-shaders'>on shaders</h2> diff --git a/blog/penrose-tilings-part-1.html b/blog/penrose-tilings-part-1.html @@ -11,7 +11,8 @@ <p>Having just moved into a new (tragically empty) flat, I've been inspired to try decorating it with some self created art, and Penrose tiling's beauty in conjunction with their relative ease of computability make them an ideal candidate. The idea I have is to write a program to generate some basic Penrose tilings, where I can then play around with the colour scheme, print out a frame, and paint them by hand in an Escher like style. How is that going to work? Let's find out.</p> <p>The rules for constructing penrose tilings are well documented, <a href="https://tartarus.org/~simon/20110412-penrose/penrose.xhtml">this</a> link in particular explains the iterative process in better detail than I ever could.</p> -<p>The initial starting triangle shares it's geometry with a slice from a decagon (I will refer to this triangle type as 't123'). The easiest way to construct it is to draw a line of length 1, rotate it by π/5 radians with respect to the origin; optionally repeat nine times and you have a decagon. Conveniently (0, 0) is the middle of the screen when it comes to computer graphics, so arranging the triangles around the center is trivial. The simplest method is to start by taking each t123 triangle and dividing it into three sub triangles; you can calculate their geometry by finding two new vertices along the parent t123 triangle using the golden ratio. Doing this correctly you can fit two triangles of type t123 and one of t124 perfectly into the parent t123 triangle, and in a similar manner the rules for dividing t124 triangles is to fit one t123 and one t124. Boom, infinite Penrose tilings. Simple right? Check out the initial decagon and first t123 split below: +<p>The initial starting triangle shares it's geometry with a slice from a decagon (I will refer to this triangle type as 't123'). The easiest way to construct it is to draw a line of length 1, rotate it by π/5 radians with respect to the origin; optionally repeat nine times and you have a decagon. Conveniently (0, 0) is the middle of the screen when it comes to computer graphics, so arranging the triangles around the center is trivial. The simplest method is to start by taking each t123 triangle and dividing it into three sub triangles; you can calculate their geometry by finding two new vertices along the parent t123 triangle using the golden ratio.</p> +<p>Doing this correctly you can fit two triangles of type t123 and one of t124 perfectly into the parent t123 triangle, and in a similar manner the rules for dividing t124 triangles is to fit one t123 and one t124. Boom, infinite Penrose tilings. Simple right? Check out the initial decagon and first t123 split below: <p><img src="assets/pizza.png" alt="" width="540" height="540" /> <img src="assets/more_complicated_pizza.png" alt="" width="540" height="540" /></p> @@ -55,8 +56,9 @@ <img src="assets/p3_four_colour_2.png" alt="" width="540" height="540" /></p> <p>I know there are better and more elegant ways of shading Penrose tilings but I feel happy that I've done what I set out to do, now the hard part is waiting for divine inspiration to kick in before I try and paint one for real.</p> +<p>You can find the code used to generate the images above in my github project <a href="https://github.com/mpizzzle/penrose">here</a>. If you want to compile the program yourself you'll have install the dependencies manually for now; I may take the time to package it with a more modern build tool in the future.</p> <p>Peace out.</p> <footer>by <strong><a href='https://michaelpercival.xyz/'>Michael Percival</a></strong></footer> </body> -</html>- No newline at end of file +</html> diff --git a/rss.xml b/rss.xml @@ -19,7 +19,8 @@ Updates from Michael Percival. Give this file to your RSS feeder to receive blog <p>Having just moved into a new (tragically empty) flat, I've been inspired to try decorating it with some self created art, and Penrose tiling's beauty in conjunction with their relative ease of computability make them an ideal candidate. The idea I have is to write a program to generate some basic Penrose tilings, where I can then play around with the colour scheme, print out a frame, and paint them by hand in an Escher like style. How is that going to work? Let's find out.</p> <p>The rules for constructing penrose tilings are well documented, <a href="https://tartarus.org/~simon/20110412-penrose/penrose.xhtml">this</a> link in particular explains the iterative process in better detail than I ever could.</p> -<p>The initial starting triangle shares it's geometry with a slice from a decagon (I will refer to this triangle type as 't123'). The easiest way to construct it is to draw a line of length 1, rotate it by π/5 radians with respect to the origin; optionally repeat nine times and you have a decagon. Conveniently (0, 0) is the middle of the screen when it comes to computer graphics, so arranging the triangles around the center is trivial. The simplest method is to start by taking each t123 triangle and dividing it into three sub triangles; you can calculate their geometry by finding two new vertices along the parent t123 triangle using the golden ratio. Doing this correctly you can fit two triangles of type t123 and one of t124 perfectly into the parent t123 triangle, and in a similar manner the rules for dividing t124 triangles is to fit one t123 and one t124. Boom, infinite Penrose tilings. Simple right? Check out the initial decagon and first t123 split below: +<p>The initial starting triangle shares it's geometry with a slice from a decagon (I will refer to this triangle type as 't123'). The easiest way to construct it is to draw a line of length 1, rotate it by π/5 radians with respect to the origin; optionally repeat nine times and you have a decagon. Conveniently (0, 0) is the middle of the screen when it comes to computer graphics, so arranging the triangles around the center is trivial. The simplest method is to start by taking each t123 triangle and dividing it into three sub triangles; you can calculate their geometry by finding two new vertices along the parent t123 triangle using the golden ratio.</p> +<p>Doing this correctly you can fit two triangles of type t123 and one of t124 perfectly into the parent t123 triangle, and in a similar manner the rules for dividing t124 triangles is to fit one t123 and one t124. Boom, infinite Penrose tilings. Simple right? Check out the initial decagon and first t123 split below: <p><img src="blog/assets/pizza.png" alt="" width="400" height="400" /> <img src="blog/assets/more_complicated_pizza.png" alt="" width="400" height="400" /></p> @@ -63,6 +64,7 @@ Updates from Michael Percival. Give this file to your RSS feeder to receive blog <img src="blog/assets/p3_four_colour_2.png" alt="" width="400" height="400" /></p> <p>I know there are better and more elegant ways of shading Penrose tilings but I feel happy that I've done what I set out to do, now the hard part is waiting for divine inspiration to kick in before I try and paint one for real.</p> +<p>You can find the code used to generate the images above in my github project <a href="https://github.com/mpizzzle/penrose">here</a>. If you want to compile the program yourself you'll have install the dependencies manually for now; I may take the time to package it with a more modern build tool in the future.</p> <p>Peace out.</p> ]]></description> </item>