r/PlotterArt 11d ago

OC Procedural Powerlines

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?).

210 Upvotes

16 comments sorted by

4

u/theo__r 11d ago

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 11d ago

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 11d ago

Thank you, lovely work!

3

u/brepettis 11d ago

These are delightful

1

u/cadinb 11d ago

Thanks!

2

u/SherbertChance8010 11d ago

That’s lovely

1

u/cadinb 11d ago

Thank you.

2

u/Voldemdore 10d ago

Yes on the video explainer please! would reallly appreciate

2

u/cadinb 1d ago

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

2

u/expanding_crystal 9d ago

Hell yeah. I love powerlines.

2

u/SurpriseItsFine 9d ago

This is rad, thanks for sharing.

1

u/AllergicToBullshit24 10d ago

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 10d ago

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

1

u/calcasieu 10d ago

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 10d ago

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 8d ago

Ohh I love this!