penrose

program for generating penrose tilings.
Log | Files | Refs | README | LICENSE

commit 0e0fbe4b9dfc6d0c3051b13253a6ae16939b7396
parent 979317ab470b6afac94a8f86835639f392949192
Author: mpizzzle <m@michaelpercival.xyz>
Date:   Wed, 21 Oct 2020 20:30:05 +0100

correcting misaligned triangles

Diffstat:
Mpenrose.cpp | 7+++----
Mscrot.png | 0
2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/penrose.cpp b/penrose.cpp @@ -47,7 +47,7 @@ void split(triangle& parent, std::vector<glm::vec2>& points, std::vector<uint32_ t = { i[1], i[2], s - 2, //t123 1 i[1], s - 1, s - 2, //t123 2 - i[0], s - 1, s - 2 }; //t124 + s - 2, s - 1, i[0] }; //t124 triangle t123_1; t123_1.t_123 = true; @@ -61,12 +61,11 @@ void split(triangle& parent, std::vector<glm::vec2>& points, std::vector<uint32_ triangle t124; t124.t_123 = false; - t124.points = { parent.points[0], p2, p1 }; - t124.indices = { i[0], s - 1, s - 2 }; + t124.points = { p1, p2, parent.points[0] }; + t124.indices = { s - 2, s - 1, i[0] }; parent.subtriangles = { &t123_1, &t123_2, &t124 }; } - //if (false) { else { glm::vec2 p3(((1.0f - phi) * p[2].x) + (phi * p[0].x), ((1.0f - phi) * p[2].y) + (phi * p[0].y)); diff --git a/scrot.png b/scrot.png Binary files differ.