Skip to content

Instantly share code, notes, and snippets.

@piotoor
Created October 30, 2018 18:57
Show Gist options
  • Save piotoor/f93c544f240f98b83f47ccc317e1813c to your computer and use it in GitHub Desktop.
Save piotoor/f93c544f240f98b83f47ccc317e1813c to your computer and use it in GitHub Desktop.
OpenSCAD Circle vs Square
circle_r = 5000;
offset = 5;
$vpr=[0, 0, 340]; // Viewport rotation
$vpd = 150 + 10 * circle_r * $t * $t * $t; // Camera distance as function of time
translate([-(circle_r + offset), 0, 0])
{
color("blue")
circle(circle_r, $fn = 1000);
}
translate([offset, -circle_r, 0])
{
color("green")
square(2 * circle_r);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment