Klein bottle

I had a user n the forum talk about voronoi over a klein bottle. the voronoi aside, I have been trying to script a klein bottle in grasshopper quite unsiccessfully, because the surface invert, the “mesh view” breaks spectacularly, to the point where I cannot even grab a screenshot before rhino dies.

How do we handle minimal surface creation in Grasshopper?

(example of the klein bottle in video and the thread it originated in. Any help appreciated. )

In the last video on fede139 comment you can see the geometry was divided in more zones.
That is needed if you want to avoid the self-intersection part.
Otherwise you could populate a torus and then translate the UV coordinates to the bottle. (for a start, it wont be perfect)
It could be even scripted to populate the torus, finding rough near point there, but then using the distance of the translated points on the bottle (for each iteration).

For the voronoi part, for each point you could use a small set of points and take only the central cell for each set. The sets should be done/found in the torus shape (or you could use a geodesic/curveonsurface distance/length).

This can be solved probably in many other ways also, it depends your needs.

I’m trying to make one surface only which all works fine until it touches itself then all hell breaks loose. I’ll try grab a screenshot with my phone.

Can you send us a file that crashes?