This is the honest logo, a bunch of razor blades sticking out
Precise Nix logo rework (aka genix7000) by cab404 · Pull Request #84 · NixOS/nixos-artwork · GitHub aaand the logical conclusion?
Now look at this!!
Hacked together yesterday evening/this morning and it barely works.
I just threw the video from @cab at ezgif mp4 to png converter which is really unclean, but at least I got some images…
PRs welcome
Edit: I have no clue about flakes so if somebody wants to actually add a flake…
That’s awesome! Love it.
I can send you original PNGs exported from openscad)
Nice work, thanks
Flake PR submitted
nix run github:cab404/genix7000
When merged
edit: responded to wrong comment
edit2: added flake pr to @Melkor333 project too
Now we can run GeNix7000 without UI
nix run github:cab404/genix7000#to-image -- bla.png --camera '0,0,480,0,0,0' --num 6 grey cyan "\#cd3535"
nix run github:cab404/genix7000#to-image -- --help
edit: fixed colors thanks to @igel
// === Nix logo specification
// number of lambdas. doesn't really work if changed in this model.
num = 6;
// Central aperture diameter, in units. It does produce nice effects if animated.
aperture = 2 + -2 * $t;
// lambda height in units. fun to play with
length = 4 + -4 * $t;
// Clipping polygon diameter, in units
clipr = 8 + -8 * $t;
or something along those lines was used for this — someone on Discord asked me, and I’ve realized I haven’t got this documented
nix run github:cab404/genix7000#to-image – x.png --camera ‘0,0,480,0,0,0’ --colors ‘[“grey”, “cyan”]’ --num 3
Error: nu::parser::unknown_flag
× The `main` command doesn't have flag `colors`.
╭─[<commandline>:1:1]
1 │ main x.png --camera 0,0,480,0,0,0 --colors `["grey", "cyan"]` --num 3
· ────┬───
· ╰── unknown flag
╰────
help: Some available flags: --num, --thick, --imgsize, --offset, --gaps, --rotation, --angle, --camera, --clipr, --cliprot, --clipinv, --help(-h)... Use `--help` for a full list
of flags and more information.
Sorry, isn’t --colors
but ...colors
nix run github:cab404/genix7000#to-image -- bla.png --camera '0,0,480,0,0,0' --num 6 grey cyan "\#cd3535"
How can we make it work with command line interface?
Do you mind to explain step by step?
- Did you run the creation of image N times with different t, then joined all together
- What you use to convert frames into vid?
- Openscad has this feature?
Openscad has an animation mode, which cycles $t
between 0 and 1 in small increments. If you enable it and check Dump pictures
flag, it will start saving frames in current folder.
Or you can run openscad --animate 60 ./a\ good\ version\ of\ the\ logo.scad --camera 0,0,0,0,0,0,500
After that you can glue them together using ffmpeg — ffmpeg -r 30 -i 'frame%05d.png' mow.mp4
and there you go
My implementation is a bit hacky, but I’m happy with the flexibility.
nix run github:cab404/genix7000#to-image -- mad.mp4 --animation \
'{
thick: ($thick + $i / 2),
num: ($num + $i / 10),
rotation: ($rotation + $i / 2),
angle: ($angle + $i / 2),
clipr: ($clipr + $i / 10),
cliprot: ($cliprot + $i / 10),
# camera: $"0,0,(1200 - $i * 15),0,0,0"
}'
edit: updated command to point to repository now that is merged
It turned out OpenSCAD is not that good exporting transparent PNGs. There is a way in exporting colored SVGs and then rendering them to PNGs, but I need to fix exporter for that — and inkscape broke their scripts again
You can use #to-image for that.
nix run github:cab404/genix7000#to-image -- bla.svg --num 7 "\#cd3535" "\#5d3555" "\#cd5555"
nix run github:cab404/genix7000#to-image -- --help # to see all args
If you need to export to SVG, with your already defined parameter set (.json), change the to-image.nu lines:
- 121, 134 (-P profile name);
- 122, 133 (-p parameter set path.json);
- 126, 135 (the .scad file)
And run
nix run .#to-image -- bla.svg "\#cd3535" "\#5d3555" "\#cd5555"
Now that I’m noted that I’m not passing camera to scad command of line 132
Also, let me know if a PR to take this 3 from command line makes sense.
Note, svg didn’t work with named colors: gray, cyan, etc
I’ve made animation.nu
script to easily export transparent animation frames. It yields far better results than bg removal, and is really quick.
It is intended to be hacked in place, so just clone the repo :)
So yeah, now we can do things like that no problems
and obviously, an evil soviet occult pentanix