How to simulate overlapping/blocking of objects

Have a simple script that draws some overlapping noisy polygons. When you fill the polygons, the resulting shape looks like a rough cylinder, because the ‘behind’ parts of the polygons are obscured. But when I send this as svg to my AxiDraw plotter, each of the polygons are drawn in full, so I lose the ‘cylinder’ effect.

Wondering what ways I can clip out the parts that i want to be obscured? Would like to do it entirely inside processing-python rather than post-processing in inkscape before I launch it to my axiDraw.

3 Likes

You need to define your line drawing function and your own clipping functions.
There are no builtin functions that match your scenario.

Alternatively, you can use a library such as

1 Like

thank you, I’ll check out that library you cited.

I assume that the plotter plots lines and not points?

yeah, it draws lines. It can stiple, but that’s not very good.

2 Likes

Maybe these examples of Geomerative used in Python mode can be of some help:

1 Like