Last active
October 26, 2024 17:00
-
-
Save vittau/4adda9c2d51de49a15d4011456e50fd8 to your computer and use it in GitHub Desktop.
VHS Curve Bend points generator
This file contains 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
// 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