How to make Breakable Glass

Well, in that post @Fractality_alt says:

I did a quick search on Fortune’s algorithm.

Wikipedia says “Fortune’s algorithm is a sweep line algorithm for generating a Voronoi diagram”

I think a Voronoi diagram simulates breaking glass. Again, Wikipedia says “In mathematics, a Voronoi diagram is a partition of a plane into regions close to each of a given set of objects”

Here’s the Fortune’s algorithm in action, creating a Voronoi diagram out of random points. (Found on Wikipedia)

IMG_3248

So @Fractality_alt is saying that you run that algorithm with random points on the window, which are the points where the glass will break. Then, convert the Voronoi regions into wedge parts, and like @pro_developer213 said, teleport them to replace the unbroken glass with them. Then, following @Fractality_alt’s instructions, apply VectorForce to each part? I’m not sure what that means, but it may be important.

@Fractality_alt’s way doesn’t make the glass break into exactly eight pieces, but it simulates broken glass.

2 Likes