Skip to content

Instantly share code, notes, and snippets.

@vittau
Last active October 26, 2024 17:00
Show Gist options
  • Save vittau/4adda9c2d51de49a15d4011456e50fd8 to your computer and use it in GitHub Desktop.
Save vittau/4adda9c2d51de49a15d4011456e50fd8 to your computer and use it in GitHub Desktop.
VHS Curve Bend points generator
// VHS Curve Bend points generator to be used in GIMP with the Curve Bend tool.
// For great vaporwave.
function generate_val(intensity) {
return Math.round(127 - intensity / 2 + Math.random() * intensity);
}
const INTENSITY = process.argv[2] || 1.15;
console.log("POINTFILE_CURVE_BEND\nVERSION 1.0");
console.log(`# INTENSITY = ${INTENSITY}`);
for (let i = 0; i < 256; i++) {
const left = generate_val(INTENSITY);
const right = generate_val(INTENSITY);
console.log(`VAL_Y ${left} ${right}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment