Extending the cloth simulation

I am not a professional programmer and I was very fascinated by the cloth simulation example. I’ve been trying to extend the example and add new functions just for fun. :slight_smile: Does anyone knows a good source of information on particle physics “for dummies” and how to programm it? ( or is this one of those things you can’t be dummy if you want to mess with it?)

I wanned to alter its behavior so that the cloth does not “fold” over itself while only existing in 2D. Usually, in our practical life, two things do not ocupy the same place, and I am not trying to programm any quantum freakness. :slight_smile: I was hoping that there is some elengant mathematical solution for that without having to implement conditionals to avoid each “node” of the cloth to go over each other.


I think you might be able to change the stiffness of the springs to prevent folding. I’m not too sure where those settings might be located in the code though.

I was amazed how complex trying to find how two lines intersect was (and I never did finish that project I don’t believe)