Last active
July 1, 2020 07:18
-
-
Save idcrook/56b3f4985984cc609ef8fb3ae3dc32a9 to your computer and use it in GitHub Desktop.
Recreate mesh of Instruments
This file contains hidden or 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
#!/bin/bash -x | |
for j in `seq 0 144`;do | |
i=`printf "%04d" $j` | |
r=`expr 5 \* $j` | |
openscad -o logo_anim-$i.png app_icon_model.scad --preview --camera=0,0,0,90,0,$r,415 --colorscheme="Tomorrow Night" --projection=o | |
done |
This file contains hidden or 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
size = 100; | |
// https://openscadsnippetpad.blogspot.com/2017/06/figure-eight-path.html | |
function figure8(m=size)=[for(t=[0:1:360]) | |
let(scale = 2 / (3 - cos(2*t)),x =m* scale * cos(t),y =m* scale * sin(2*t) / 2) | |
[x,y]]; | |
function close(p)= concat(p,[p[0]]); | |
module polyline(p) {for(i=[0:max(0,len(p)-2)])line(p[i],p[i+1]);} | |
module line(p1, p2, width=(size/7)/2.0) | |
{ | |
hull() { | |
translate(p1) sphere(width); | |
translate(p2) sphere(width); | |
} | |
} | |
module one_symbol() { | |
polyline(close(figure8(size/2))); | |
} | |
module assembly2 () { | |
x_off = 16.5; | |
z_off = 23; | |
translate([-x_off,0,0]) | |
//rotate([45/2 , 90 + 30, 45/2]) | |
rotate([0 , 90 + 30, 0]) | |
rotate([0 , 0, -15]) | |
one_symbol(); | |
translate([x_off,0,0]) | |
rotate([0, -(90 + 30), 0]) | |
rotate([0 , 0, -15]) | |
one_symbol(); | |
translate([0,0,-z_off]) | |
rotate([0 , 0, -15]) | |
rotate([0 , 0, 0]) | |
one_symbol(); | |
} | |
show_assembly = true; | |
// $preview requires version 2019.05 | |
fn = $preview ? 30 : 100; | |
if (show_assembly) { | |
scale ([1.0,1.0,1.0]) | |
translate([0,0,0]) | |
rotate([0,0,0]) | |
assembly2(); | |
} else { | |
scale ([1.0,1.0,1.0]) | |
translate([0,0,0]) | |
rotate([0,0,0]) | |
one_symbol(); | |
} |
This file contains hidden or 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
#!/bin/bash -x | |
convert 'logo_anim-*.png' -set delay 1x24 animated.gif |
This file contains hidden or 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
#!/bin/bash -x | |
ffmpeg -f image2 -i logo_anim-%04d.png -vcodec libx264 -b 1M -pix_fmt yuv420p -y -r 12 logo_anim.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment