Created
June 3, 2025 04:05
-
-
Save scruss/eca7bcc91c471c9c1bc83fe22b1f4d03 to your computer and use it in GitHub Desktop.
asanoha pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// asanoha pattern - scruss, 2025-06 | |
// pic: https://xoxo.zone/@scruss/114617440365223683 | |
h=30; | |
r32=sqrt(3)/2; | |
eps=1e-4; | |
spot_dia = 2*h/25; | |
module up_triang() { | |
translate([cos(30)*(h/2)/r32,sin(30)*(h/2)/r32])for(i=[0:2]) { | |
rotate(i*120)offset(delta=-eps)intersection() { | |
rotate(90)circle(r=(h/2)/r32, $fn=3); | |
polygon([ | |
[0, 0], | |
[0, h], | |
[h*cos(330), h*sin(330)] | |
]); | |
} | |
} | |
} | |
module loz() { | |
union() { | |
up_triang(); | |
mirror([0,1])up_triang(); | |
} | |
} | |
module spot() { circle(d=spot_dia, $fn=12); } | |
module halfspot() { circle(d=spot_dia/2, $fn=12); } | |
module lozenge() { | |
difference() { | |
loz(); | |
union() { | |
spot(); | |
translate([h, 0])spot(); | |
translate([h*cos(60), h*sin(60)])spot(); | |
translate([h*cos(-60), h*sin(-60)])spot(); | |
} | |
} | |
} | |
intersection() { | |
for(y=[0:10]) { | |
for(x=[0:10]) { | |
translate([h*x-((y%2)*h)/2, y*h*sin(60)])union() { | |
lozenge(); | |
halfspot(); | |
translate([h, 0])halfspot(); | |
translate([h*cos(60), h*sin(60)])halfspot(); | |
translate([h*cos(-60), h*sin(-60)])halfspot(); | |
} | |
} | |
} | |
square([8*h, 8*h*r32]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment