1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-05 14:27:45 +02:00
This commit is contained in:
Justin Lin
2022-05-20 10:05:41 +08:00
parent d5dd12ffcd
commit 6fa4fe0ea9
2 changed files with 9 additions and 6 deletions

View File

@@ -1,5 +1,3 @@
use <hull_polyline2d.scad>;
use <ptf/ptf_rotate.scad>;
use <util/dedup.scad>;
// tile type
@@ -131,7 +129,10 @@ function tile_penrose2(n, triangles) =
[type, [shape[0], shape[3], shape[2]]]
]
];
use <polyline_join.scad>;
use <ptf/ptf_rotate.scad>;
module draw(tris, radius) {
for(tri = tris) {
color(tri[0] == KITE ? "black" : "white")
@@ -139,7 +140,8 @@ module draw(tris, radius) {
}
for(tri = tris) {
hull_polyline2d(tri[1] * radius, .1);
polyline_join(tri[1] * radius)
circle(.1);
}
}

View File

@@ -52,13 +52,14 @@ function tile_penrose3(n, triangles) =
a = 720 / fn,
tris = _penrose3(
is_undef(triangles) ?
// star
let(shape_tri0 = [[1, 0], [1, 0] + _zRotation(-180 + a) * [-1, 0], [0, 0]])
[
for(i = [0:fn / 2 - 1])
let(m = _zRotation(i * a), t = [for(p = shape_tri0) m * p])
each tri2tile("OBTUSE", t)
] :
[for(tri = triangles) each tri2tile(tri[0], tri[1])],
[for(tri = triangles) let(t = tri[1]) each tri2tile(tri[0], [t[1], t[2], t[0]])],
n
)
)
@@ -82,7 +83,7 @@ radius = 10;
$fn = 12;
draw(tile_penrose3(5, [
["OBTUSE", [[0, 0], [2, 0], ptf_rotate([2, 0], 108)]]
["OBTUSE", [ptf_rotate([2, 0], 108), [0, 0], [2, 0]]]
]), radius);
translate([40, 0])