Skip to content

Instantly share code, notes, and snippets.

@martin-ueding
Created May 3, 2020 15:15
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 martin-ueding/9cd7ecd89756a2636f86da79b0a8e5ad to your computer and use it in GitHub Desktop.
Save martin-ueding/9cd7ecd89756a2636f86da79b0a8e5ad to your computer and use it in GitHub Desktop.
module mycube() {
cube(size = 20, center = true);
};
module myplane(thickness) {
color("black", alpha = 0.1)
rotate([0, 0, 180])
rotate([0, 0, 135])
rotate([-145, 0, 0])
translate([-20, 0, -20])
cube([40, thickness, 40], center = false);
};
function gamma (beta) = 1 / sqrt(1 + beta*beta);
beta = 0.0;
multmatrix([[1, beta, beta, 0],
[beta, 1, beta, 0],
[beta, beta, 1, 0],
[0, 0, 0, 1]])
{
difference() {
mycube();
myplane(100);
}
myplane(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment