Use Turbowarp for better performance https://turbowarp.org/756114016?interpolate&hqpen Drag dots to change triangle.
The sierpinski triangle! This image is generated using the "chaos game" algorithm. It goes as follows: 1. Take three points in a plane to form a triangle. 2. Randomly select any point inside the triangle and consider that your current position. 3. Randomly select any one of the three points making up your triangle. 4. Move half the distance from your current position to the selected point. 5. Plot the current position. 6. Repeat from step 3.