Closed djacu closed 8 months ago
I wonder how this PR relates to https://github.com/NixOS/nixos-artwork/pull/84. Does one supersede the other?
@ners I think the SCAD code in this, is a bit simpler, in some ways it's a bit of a refactor of #84, I think this PR would take precedent, given the fact that it's less code that does the same thing.
@ners In addition to what @MatthewCroughan said, this PR does not rely on intersecting geometries like #84 does. I read through #84 and it creates lambdas by performing boolean operations on several squares which is not ideal. For this PR I figured out explicitly where each vertex of the lambda exists, so each lambda is a single fully constructed polygon.
If you look at the image below, you can see how I determine the points. What I discovered was that if you image a line running through the center of the lambda legs, they should intersect 3 points of a hexagon: the upper left and the two bottom vertices. That makes it easy to draw the outer parts of the lambda which are just thickness
at some angle 60*n
where n
is an integer. The points of the lambda close to the origin where tricker to figure out but you can see everything on lines 57-65 of the parametric-flake.scad
file.
cc @samueldr
well, the gradient problem is still there
(also, intersections allow for wider range of modification, but since it's a nixos artwork repo, I guess that's not that good of an argument)
anyways, good job with simplifying it to a polygon! <3
well, the gradient problem is still there
(also, intersections allow for wider range of modification, but since it's a nixos artwork repo, I guess that's not that good of an argument)
anyways, good job with simplifying it to a polygon! <3
Thanks!
Yeah the gradient problem still exists, but I don't have the scad skills to figure it out nor the time right now.
Having #84 hanging here for a while just due to gradients not being there, and then this getting merged is a bit... well, actually quite a bit — insulting.
Having #84 hanging here for a while just due to gradients not being there, and then this getting merged is a bit... well, actually quite a bit — insulting.
Hey @cab404 I just got merge privileges on this repo today. I don't see any reason why we should hold up your PR because of gradients. Is there anything else you wanted to do to it or should I merge it?
Is there anything else you wanted to do to it or should I merge it?
That would be nice, thank you!
This is a NixOS flake logo that is fully parametric. The size, height, thickness and gap are variable. Thanks to @waalge for helping with the maths.
The parameters for generating a NixOS flake.
gap
- The gap between lambdas.height
- The z-height of the flake.scale
- The radial (x,y) size of the flake.thickness
- The thickness of the lambda legs.scale
updatesgap
andthickness
so there is no need to compesate these values. Agap
of 0 will leave no gap between the lambdas. Agap
of 1 will remove the top portion of the long lambda leg until the point where the two lambda legs intersect.A
gap
of 0.05 to 0.15 is a good value for replicating the official NixOS flake. Athickness
of 0.5 is a good value for replicating the official NixOS flake. OpenSCAD doesn't have a concept of units so usescale
andheight
values in the desired ratio.My defaults with a
thickness
of 0.5 andgap
of 0.1.thickness
decreased to 0.25.thickness
increased to 0.75.gap
reduced to 0.gap
increased to 0.2.