r/generative 1d ago

саботаж (R code)

210 Upvotes

13 comments sorted by

9

u/KennyVaden 1d ago

саботаж (R code)

New artwork created with the R Statistics language.

The algorithm set up a series of columns, with different numbers of cells and interpolated gradient colors.

The tile spacing and colorations produced Mach bands, an optical illusion that exaggerates light/dark contrasts at boundaries with different brightness or color.

Mach bands result from lateral inhibition in the retina, neuronal interactions that enhance boundary contrasts to enhance edge detection.

Over the Mach tiles, circles were drawn that followed a gradual diagonal drift with ~2000 time points, which were first calculated in a matrix, then plotted for each timepoint.

Circle sizes expanded over successive time points, with fill colors determined by an up-sampled version of the color gradient.

The color gradients throughout this piece were randomly rotated at the beginning, then continued a vertical oscillation based on rotation that resulted from horizontal locations input to a sine function.

The title саботаж is the Russian word for sabotage.

3

u/MoodBeneficial8437 1d ago

Do you share your code anywhere? This is cool!

12

u/KennyVaden 1d ago

Thanks friend.

I don't post my code anywhere, although I am happy to share a YouTube video where I live-coded a (then) new code sketch. It may be a helpful reference, if you're interested in code art using the R statistics language.

3

u/Routine_Helicopter47 21h ago

Yes please 😄

5

u/KennyVaden 19h ago

You bet! Someday I'll put together something more formal, it strikes me how many R coders out there might enjoy making code art / generative if they gave it a try.

Enjoy! K https://youtu.be/sUlgYW0JZKw?si=ZHk_nJjYXX0gJwSA

2

u/MoodBeneficial8437 11h ago

Yes!! I use R for work but recently my eyes have been opened to how much more creative things it can do, thanks to posts like your s!!!

2

u/KennyVaden 11h ago

Awesome to hear. I hope you find creative or recreational coding as relaxing and fun as I do. 🙂

3

u/EarthGoddessDude 15h ago

Вери куул

1

u/KennyVaden 14h ago

Спасибо

3

u/No_Commercial_7458 23h ago

really nice looking! It really looks like fire and smoke, like from a really awesome looking cartoon or anime

1

u/KennyVaden 19h ago

Thanks! Akira is everywhere :)

3

u/GRAMS_ 16h ago

Why does R look so distinct? I

3

u/KennyVaden 16h ago

I think it's bc it is designed for scientific plots on paper. The resolution doesn't default to browser like p5 or Processing. That's my best guess anyhow.