How have you made art with code?
from ExperimentalGuy@programming.dev to programming@programming.dev on 17 Feb 2026 19:31
https://programming.dev/post/45919960

I saw the post earlier about making maps using Python. I thought that was a really cool concept as I love seeing open art projects like that. Do you know any other projects that allow you to make art with code?

#programming

threaded - newest

shrek_is_love@lemmy.ml on 17 Feb 2026 19:35 next collapse

I haven’t used it myself, but you might want to check out Processing.

Pechente@feddit.org on 17 Feb 2026 20:08 next collapse

Yep I used that in university for generative art. It was a lot of fun and actually got me into coding unlike many failed attempts before that.

wizardbeard@lemmy.dbzer0.com on 17 Feb 2026 22:08 collapse

I’ve fooled around with Processing a lot, and have used it and later (iirc) a C++ or C# library many years ago to do “programmatic” edits to images and photos I had taken.

Stuff like:

  • What if I treat the pixels in an image as one long strip and instead of placing them in left to right strips top to bottom, I lay them down in a spiral? Or in vertical strips despite the original image not being square?
  • What if I interleaved a copy of the image upside down every other row of pixels?
  • Let’s just apply random fucking math to the different color values!
  • Let’s select random rectangular sections of the image and paste them over the original at a random location, rinse and repeat 100 times.
  • What if I broke the image down into a grid of equally sized rectangles and shuffled their location?
  • What if I averaged the color of each rectangle and added that to the existing color value of those pixels?
  • etc etc.

I’d come up with different ways to select portions of the image, different ways to place that back in, and different ways to combine the “pasted” section with original. I tossed together something like 30 different “formulas”, then would do like 10 runs of each one that had random elements, spit out the results into a folder of what ultimately was something like 300 “result” images, and then decide the five or so I liked the best.

Add in the fact that I really don’t have any clue how color math works so I wasn’t basing my ideas off anything but whimsy, and some occasional pre and post processing with both paint.net plugins and audacity (you can sometimes open images as raw binary, avoid the file header, apply audio effects, and save it as raw binary to still have an image but it often just makes a corrupt file).

Had a decent “glitch art” hobby going to keep me occupied in my free time.

I desperately need to find that old code again. I miss tinkering with it.

Unfortunately, the existing results are tied to a flikr account with connections to my real name, so I’d have to find the code and make more to share.

Sheldan@lemmy.world on 17 Feb 2026 19:50 next collapse

I did make some things using html canvas which I think can be considered art.

hono4kami@piefed.social on 17 Feb 2026 20:02 next collapse

Ah, the real generative art, before ‘AI generative “art"’

You should look into shader art. Basically “drawing” using code that runs purely inside GPU. Which reminds me I recently found an artist that does this with code that fit within Twitter character limit. Sadly I can not remember the name rn.

Edit: the artist I was thinking of is XorDev

bestboyfriendintheworld@sh.itjust.works on 18 Feb 2026 08:18 next collapse
ExperimentalGuy@programming.dev on 20 Feb 2026 18:20 collapse

Any recommendations on what languages/libraries to use for that?

Klear@quokk.au on 21 Feb 2026 16:51 collapse

GLSL. Start here.

Even if you don’t intend to learn to write shaders, this has a very approachable and fun explanation on how everything works.

hperrin@lemmy.ca on 17 Feb 2026 20:03 next collapse

I made a sorting algorithm visualizer.

sciactive.github.io/libsortjs/demo/

It’s not really any different than a lot of other sorting algorithm visualizers. It has some additional features, like different visualizations, but it doesn’t have sound.

I didn’t do it to make something better though, I did it to make it myself. I wanted to implement all of those sorting algorithms myself, which was very fun.

I don’t know if you consider that art, but I think it can be beautiful, so maybe.

(Btw, it will happily crash your browser if you try to sort an enormous list using a really inefficient algorithm, so be careful.)

ExperimentalGuy@programming.dev on 20 Feb 2026 18:23 collapse

I get wanting to just do it yourself. That’s part of why I asked the question because I want to be able to design my own algorithmic art pieces.

reabsorbthelight@lemmy.world on 17 Feb 2026 20:23 next collapse

My tattoos are all simulations I built and ran

KiranWells@pawb.social on 17 Feb 2026 21:07 next collapse

I personally enjoy playing around with fractals - I’ve built several fractal rendering programs (this is the latest), and they are quite fun to play around with. While they are more art from math than art from code, there are a lot of creative things you can do in code to visualize different features of fractals - Inigo Quiles has great examples of this, as well as non-fractal procedural art such as SDFs.

null@piefed.nullspace.lol on 17 Feb 2026 21:15 next collapse

Through trial and error on https://nudel.cc

Sunsofold@lemmings.world on 17 Feb 2026 22:08 next collapse

Does writing SVGs by hand count?

ExperimentalGuy@programming.dev on 20 Feb 2026 18:22 collapse

Have you actually done that???

Sunsofold@lemmings.world on 21 Feb 2026 00:24 collapse

A couple times. Also modified some in text format. Not as an everyday activity, though.

one_old_coder@piefed.social on 17 Feb 2026 22:14 next collapse

Open-source projects to make music:

OK, it’s not code but still fun though.

ChucK is a “programming” language: https://chuck.stanford.edu/

HelloRoot@lemy.lol on 17 Feb 2026 22:26 collapse

strudel.cc

if you really want to code music

example of a recorded live programming performance: www.youtube.com/watch?v=iu5rnQkfO6M

GammaGames@beehaw.org on 17 Feb 2026 22:37 next collapse

During covid I tried out processing with python, I threw my code up on github: github.com/GammaGames/processing

Random rainbow with a gamma that I sometimes use for my banner: <img alt="" src="https://beehaw.org/pictrs/image/1847aeac-22ce-48a8-98dd-90ea16fa75ff.png">

Some blossoms I got from unsplash: <img alt="" src="https://beehaw.org/pictrs/image/7bfe1c84-3c9d-4334-92cd-72cceae27b32.png">

I also made a “procedurally generated ruleset” mostly so I could use a generated texture pack from 2019, but also because I wanted to mess with yaml. It runs in the browser, kinda!

<img alt="" src="https://beehaw.org/pictrs/image/2c080599-93fe-457c-9f1e-f1ee1646b616.jpeg">

spartanatreyu@programming.dev on 17 Feb 2026 23:19 next collapse

I’m usually programming, but I’ve got a few bits and pieces that can be shared:

  • Weird blobs
  • Cellular automata experiment
  • CSS-only mosaic pattern
    • Was exploring how different browser engines render the same instructions differently, ended up with this. Changing the zoom also affects the visual
    • codepen.io/spartanatreyu/pen/Yzbmvbr
  • Fixed grain noise texture overlay on animated elements
  • CSS/SVG water color text effect
    • A friend wanted a water color effect on a website, I knew that a simple SVG shader could do it and came up with this as an example for them that they could customise later. For those who don’t know SVGs were originally intended to be a shader language. Plus by using an SVG as a shader instead of canvas, the text is treated as text (selectable, accessible, etc…)
    • codepen.io/spartanatreyu/pen/xggjWz
  • An animated background experiment

The rest are too experimental, or are released commercial projects.

frankenswine@lemmy.world on 18 Feb 2026 00:21 next collapse

SuperCollider

ns1@feddit.uk on 18 Feb 2026 00:23 next collapse

In case you weren’t aware, there is actually a whole mastodon instance dedicated to this subject! Take a look at genart.social/tags/genuary2026 for some recent examples. Many posters include details of what software they are using or links to their code

IanTwenty@piefed.social on 18 Feb 2026 07:34 next collapse

https://strudel.cc/

What can you do with Strudel?

  • live code music: make music with code in real time
  • algorithmic composition: compose music using tidal’s unique approach to pattern manipulation
macroplastic@sh.itjust.works on 18 Feb 2026 08:56 next collapse

Processing and its descendants, p5.js, p5.py. Nannou for Rust.

vpype is a really powerful python library/toolkit for generating art for plotters (drawing robots).

Blender with python scripting is also widely used.

Some relevant keywords: “procedural art”, “generative art” (generative AI is kinda killing this one), “creative coding”, “algorithmic art”, “plotter art”, “pen plotter”, “live coding” (for music with code)

The fediverse (mostly mastodon) has a decent presence of artists, usually tagging works with some of the above keywords.

ExperimentalGuy@programming.dev on 20 Feb 2026 18:21 collapse

That sounds like some great places to start, much appreciated!

macroplastic@sh.itjust.works on 21 Feb 2026 16:34 collapse

Also, these are more targeted at beginners to programming, but Daniel Shiffman has a youtube channel and a free book about creative coding with p5 (The Nature of Code) that is very good. Depending on your background, it may contain a lot of remedial material, but there’s some really great ideas on how to think about designing dynamic systems that make cool images and interactive art in there, especially in the later chapters if you skip around.

technocrit@lemmy.dbzer0.com on 18 Feb 2026 16:14 collapse

I would recommend Julia. I switched to Julia from Python because (IMO) it’s much faster and has better libraries.

For example, when I made videos with Python, I would have to save images and then convert to video with ffmpeg. But Julia has a library to generate videos on the fly without saving images. This is massively faster. They might have a library like this for Python now, but I’m not going back.

I don’t want to post any of my work because of anonymity, but it’s mostly animations of fractals, dynamic systems, etc.

ExperimentalGuy@programming.dev on 20 Feb 2026 18:28 collapse

Are there any libraries in Julia that you’d recommend?

technocrit@lemmy.dbzer0.com on 27 Feb 2026 01:51 collapse

I mostly use standard libraries for colors, images, etc.

I basically switched to Julia for the VideoIO library because it saves so much time processing images into videos.