Drawing and manipulating lines according to their vertices?

Hi there,
very nice geo-details page there:
https://docs.derivative.ca/Geometry_Detail

and Primitives too
https://docs.derivative.ca/Primitive

I’d like to be able to manipulate (and draw) lines primitives on a procedural way.
I’d have arrays (py or DATs) storing coordinates, I’d have routines, that would flag some for changing the way they would be drawn, that would change coordinates etc.

I thought about instancing Lines SOP. But I can’t easily (with my TD’s knowledge) manipulates them through their PointA & PointB as each instance can’t be controlled like that with the Geom COMP (again, as far as I tested)

I thought about Script SOP way too.

I’d have a reasonable number of lines (I mean, we are not in a point cloud millions way… but more around 1000 maximum)

Any ideas would be very appreciated for discussing here :slight_smile:

Julien,
It can be more interesting to use a tabble DAT with a list of points (you can generate it proceduraly or edit it in Excel) and use add Sop with points DAT and polygon to obtain an easy to manage polyline.
Like that
addLine.toe (4.2 KB)

2 Likes

a more organic answer
addCurve.toe (4.6 KB)

hi @jacqueshoepffner, thanks for your answers.
I got it. I understand well how I could drive dynamically (through python procedural script or some Noise CHOP to DAT etc) my table.

Actually, as far as I understand, this method works only for polylines.

With p5, it works smoother as it procedurizes everything


ok for the curves too.

I saw the opviewer node you used. and I can see performance changing from 33 to 60 fps sometimes. I can’t understand why it does this.

Another question about the shuffle, even if I know what it does, I don’t understand why we “have to” use it here. Is it for adding more random and variations or is it very required ?