This is a Sierpinski triangle fractal generated using the chaos game method, in which a point inside a triangle is copied halfway to any random vertex of the triangle. That is to say, we pick a point inside an initial triangle, then randomly select a corner in that triangle. We then take the x and y coordinates of that corner/vertex and find the difference between that and the coordinates of the starting point. Finally, we divide those differences by 2 and use those as the coordinates for the next point, and repeat. If you want, you can run the program I wrote to generate the fractal, or look at the code (in JavaScript) I used.
Updated Chaos Game Fractal Generator
I have created another version of my chaos game fractal generator program. The new version allows for the user to input the number of vertices used to generate the fractal, as well as adding one (optional) rule: whether the same vertex can be selected more than once in a row. This post, in which I … Read moreUpdated Chaos Game Fractal Generator