Skip to content

Instantly share code, notes, and snippets.

View AdmiralPotato's full-sized avatar
🐐
Probably filling databases with Goats

Admiral Potato AdmiralPotato

🐐
Probably filling databases with Goats
View GitHub Profile
@AdmiralPotato
AdmiralPotato / README.md
Last active April 27, 2017 00:58
Tribute to: thedotisblack's "Optical Art with Lines"

The original work that inspired me is fantastic. I wanted so see if I could pull it off real quick and easy in SVG. Answer is mostly, but by the time I felt like going to bed, I realized that they used decreasing space between the lines, and mine was constant. Check the original, it's super relaxing to watch - it's quite a bit faster than mine though.

Original work: Generative Pattern Drawing: Optical Art with Lines (Made with code / Processing)

@AdmiralPotato
AdmiralPotato / gif_process.js
Created January 13, 2017 11:12
Reads folders of sequences of PNGs. Exports oodles of optimized GIFs at different sizes and crops to post at different internets places.
//REQUIREMENTS: The following programs must be installed and accessible in your PATH
// node > 6
// imagemagick's command line tool "convert"
// gifsicle
//USAGE: Change params at the top to your liking. `node gif_process.js` starts it up.
// EXECUTES ALL TASKS IN PARALEL.
// If you run it like this, it will CONSUME YOUR WHOLE COMPUTER (100% cpu, 100% memory) for a few minutes while it works.
//DISCLOSURE: I was running terribly low on sleep when I wrote this. It's a tool. It gets a job done like ten times ever. Don't judge me on this. The code I write for my day job is like way better and I care a lot more about it because I have to maintain it all the time.
//LICENSE: MIT
@AdmiralPotato
AdmiralPotato / bibodhas_triangles.py
Created February 25, 2015 09:39
Another Blender Python Script to animate a large number of group instances in a really captivating motion pattern. Created with my developer friend Bibodha. https://github.com/bibodha
#So far, my Python scripts for Blender are segmented into
#a "create the objects" script,
#and a "describe their motion over time" script.
#The "motion.py" script must be run and have the "register"
#checkbox clicked on it in the Blender "Text Editor" window,
#so that it will add the driver every time the file loads.
#To use the creation script, you must already have a group named
#"Triangle" defined with some renderable mesh in it so that the
#"creation.py" script can create instances of that group.
#My "Triangle" group has a skinned wireframe triangle in it.
#So far, my Python scripts for Blender are segmented into
#a "create the objects" script,
#and a "describe their motion over time" script.
#The "motion.py" script must be run and have the "register"
#checkbox clicked on it in the Blender "Text Editor" window,
#so that it will add the driver every time the file loads.
#To use the creation script, you must already have a group named
#"Dot" defined with some renderable mesh in it so that the
#"creation.py" script can create instances of that group.
#My "Dot" group has a 5 level subdivided Icosphere in it.
@AdmiralPotato
AdmiralPotato / circular_associations_f.pde
Last active February 26, 2019 08:36 — forked from AdmiralPotato/circular_associations_e.pde
Originally created on 2014-06-14 @ ‏‎11:45:20
//configurable variables
boolean
exportMode = true; //set to true when exporting, false when designing
String
folderPrefix = "../f_480";
int
fps = 24,
outputScale = 1, //set to 2 or 4 when exporting, 1 when designing
windowSize = 480 * outputScale,
numFrames = 48,
@AdmiralPotato
AdmiralPotato / circular_associations_e.pde
Last active May 7, 2021 11:21 — forked from AdmiralPotato/circular_associations_d.pde
Originally written on 2014-06-09 @ ‏‎02:30:43
//configurable variables
boolean
exportMode = false; //set to true when exporting, false when designing
String
folderPrefix = "../e_480";
int
fps = 24,
outputScale = 1, //set to 2 or 4 when exporting, 1 when designing
windowSize = 480 * outputScale,
numFrames = 48,
@AdmiralPotato
AdmiralPotato / file_sequence_reverser.js
Created July 24, 2014 15:04
A quick node tool to copy a sequence of images from one folder to another, in reverse order. '0001.exr' -> '0048.exr', '0048.exr' -> '0001.exr'
var fs = require('fs'),
path = require('path'),
inputPath = '4',
outputPath = '4-reversed',
suffix = 'exr',
startFrame = 1,
endFrame = 48,
paddingZeroes = 4,
pad = function (num, size) {
var s = num+"";
//configurable variables
boolean
exportMode = true; //set to true when exporting, false when designing
String
folderPrefix = "d";
int
fps = 24,
outputScale = 2, //set to 2 or 4 when exporting, 1 when designing
windowSize = 480 * outputScale,
numFrames = 48,
//configurable variables
boolean
exportMode = false; //set to true when exporting, false when designing
String
folderPrefix = "c";
int
fps = 24,
outputScale = 1, //set to 2 or 4 when exporting, 1 when designing
windowSize = 480 * outputScale,
numFrames = 48,
//configurable variables
boolean
exportMode = true; //set to true when exporting, false when designing
String
folderPrefix = "b";
int
fps = 24,
outputScale = 2, //set to 2 or 4 when exporting, 1 when designing
windowSize = 480 * outputScale,