Hi

I’m trying to create a curved 3d tube using Shapes3d library.

The shape of the spline is done randomly using PVectors:

```
for (int i=0; i<complexity; i++){
knots[i] = new PVector(random(-2,2)*300,random(-2,2)*300,random(-2,2)*300);
}
Oval hexagon = new Oval(60.0, 60);
shape = new Tube(path, hexagon);
```

I want to make it more realistic by avoiding intersection of the tube with itself, so it will look like some sort of knot, but still maintain a randomness factor to the generation (a new “knot” each time).

I’m not sure how to approach this problem, any idea would be appreciated