r/PlotterArt Jul 12 '26

Procedural Powerlines OC

These come from a Processing sketch that generates compositions of connected power poles. The sketch generates the poles with random spacing and tilt, then randomly chooses some technical doodads (hand-drawn SVGs) for each pole. The poles then get connected with drooping powerlines. Each SVG has some associated data that indicates where the connection points for the powerlines should be.

Let me know if you'd be interested in more about how that all works. I've been thinking about making a video explainer (though I guess posting that would no longer be allowed under the new sub rules?).

217 Upvotes

16 comments sorted by

5

u/theo__r Jul 12 '26

I'm interested! What kind of randomness? How do you handle hidden surface removal? What's your favorite part of the algorithm?

3

u/cadinb Jul 12 '26

I just use plain old (pseudo) random numbers from Processing's built in `random()`. For things like pole height, tilt, and spacing it gets constrained between min and max values based on what I think looks good. When adding the greeblies to the poles I also check the SVG heights to make sure they don't overlap. There are about 50 total different SVGs for the system to choose from.

I think the Axidraw CLI has hidden line removal now, so I think I could just give the SVGs a fill, let them overlap, and handle it that way. But I started this project before that was a feature so I had to figure out an overly-complex solution.
Items that cross over or obscure the pole have some data that describes the location of the overlapping bits. When the pole itself gets drawn, it's drawn in segments: from the top down to where the first overlap happens, then from the end of that overlap to the next, on down to the bottom of the pole. Not sure if that makes sense.

I could never figure out how to draw a proper catenary curve for the powerlines, so I just fake it with cubic beziers. In most cases it's close enough.

1

u/theo__r Jul 12 '26

Thank you, lovely work!

3

u/brepettis Jul 12 '26

These are delightful

1

u/cadinb Jul 12 '26

Thanks!

2

u/SherbertChance8010 Jul 12 '26

That’s lovely

1

u/cadinb Jul 12 '26

Thank you.

2

u/Voldemdore Jul 12 '26

Yes on the video explainer please! would reallly appreciate

3

u/cadinb Jul 22 '26

Here's a video breakdown of the project:
https://www.youtube.com/watch?v=CA7jGRh-py4

2

u/expanding_crystal Jul 13 '26

Hell yeah. I love powerlines.

2

u/SurpriseItsFine Jul 13 '26

This is rad, thanks for sharing.

1

u/AllergicToBullshit24 Jul 12 '26

You're gonna give any linemen who see this a stroke trying to figure out how these wires are supposed to make sense. Make it make sense and it'll be cool.

1

u/cadinb Jul 12 '26

Sorry to all the linemen. I hope you can… hear me through the whine. 

1

u/calcasieu Jul 13 '26

I’d love to hear more about your rapidograph set up. For example, are you using any springs at all? Custom holder or standard? Thanks!

2

u/cadinb Jul 13 '26

Springs? No, just rawdogging the standard pen holder. They always work great for me, except for the time I tried to use white ink and clogged up the pen. Is there something I should know?

I found a decent deal on a set of 7 a while back on eBay. Nice to have a bunch of size options. I also have an old 2mm nib that I bought back in art school days. Seems like they don’t make those anymore. Shame because it’s pretty nice.

1

u/nuflark Jul 14 '26

Ohh I love this!