Skip to content

Instantly share code, notes, and snippets.

@t-paul
Last active October 14, 2016 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t-paul/51d2349ff7e8d994eac95169ecca68ba to your computer and use it in GitHub Desktop.
Save t-paul/51d2349ff7e8d994eac95169ecca68ba to your computer and use it in GitHub Desktop.
CAM profile animation
function d(a) = a % 360 < 180 ? 30 + 5 * sin(3 * a) : 30;
points = [ for (a = [0 : 359]) let(t = a + $t * 360) [
d(t) * -sin(a),
d(t) * cos(a)
] ];
polygon(points);
translate([-d($t * 360 + 90) - 10, 0]) {
color("blue") square([20, 1], center = true);
color("red") circle(3);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment