Drawing a line with varying width

I’m drawing polylines, and found it might be helpful to define the width of each segment of the line independently. Is there an existing graphic type that lets me do this? The lines have a large number of segments so it would be preferable to avoid having an entity hierarchy that uses an entire sub-entity for each segment of the line. Ideally, I’d be able to define a single array of N positions and a separate array of N-1 widths, or one array of [Cartesian3, number] tuples.

Unfortunately no existing graphics type for this, not even at the Primitive API level where the best you can do is add separate polylines to PoylineCollection (like here).

1 Like

Thanks, that’s a helpful example. As it happens, I was serializing this stuff to CZML, so I’m not sure working directly with primitives is going to be an option, but it’s something to think about.

1 Like

@sean_lilley

Thank you for your input here :pray:

-Sam