Skip to content

Instantly share code, notes, and snippets.

@SharpCoder
Created October 18, 2019 05:15
Show Gist options
  • Select an option

  • Save SharpCoder/0700fd646708d47e5422f3672c7bf4f6 to your computer and use it in GitHub Desktop.

Select an option

Save SharpCoder/0700fd646708d47e5422f3672c7bf4f6 to your computer and use it in GitHub Desktop.
module circular_mirror(x=0, y=0, d, steps) {
aps = 360 / steps;
for (step=[0:steps]) {
current_angle = step * aps;
unit_x = cos(current_angle);
unit_y = sin(current_angle);
translate([x, y, 0]) {
translate([unit_x * d, unit_y * d, 0]) {
rotate(current_angle) children();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment