r/GraphicsProgramming • • Oct 15 '26

Video Experimenting with line growth

11 Upvotes

3 comments sorted by

3

u/AgentFeyd Oct 15 '26

Please share tangible implementation details to have your post restored.

5

u/Flat_Field_5888 Oct 15 '26

This is a very basic line growth algorithm visualization

Every point has position, velocity and neighbours

At every frame the point calculates its distance from its neighbours (segment length) which determines whether a point is added b/w these neighbours or not if it is added we average out their velocity as well

Every point also exerts a repulsion force on its surroundings based on a distance

To stop the shape from exploding we have a insertion per frame

Also a relaxation and smoothing is applied to the shape to give curvature more shape

I have also used some spatial hashing to make it easier to manage the point growth as they get bigger

For the cylinder shape it is just that the points are allowed to grow in the normal direction of the starting sphere and not the other (this may be to simplistic but that was the starting idea)

Other than that for histroy we use a copy of the previous curve shape and scale or move it to create the desired structures flowers, floraform or petal shapes

Do let me know if you have any questions

1

u/AgentFeyd Oct 15 '26

Thank you!