Created
May 3, 2020 15:15
-
-
Save martin-ueding/9cd7ecd89756a2636f86da79b0a8e5ad to your computer and use it in GitHub Desktop.
Half a cube -- https://martin-ueding.de/posts/half-cube/
This file contains 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
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