Article 74TYW Random hexagon fractal

Random hexagon fractal

by
John
from John D. Cook on (#74TYW)

I recently ran across a post on X describing a process for creating a random fractal. First, pick a random point c inside a hexagon.

Then at each subsequent step, pick a random side of the hexagon and create the triangle formed by that side andc. Updatec to be the center of the new triangle and plotc.

Note that you only choose a random point inside the hexagon once. After that you randomly choose sides.

Now there are many ways to define the center of a triangle. I assumed the original meant barycenter (centroid) when it said center", and apparently that was correct. I was able to create a similar figure.

hex_barycenter.png

But if you define center differently, you get a different image. For example, here's what you get when you use the incenter, the center of the largest circle inside the triangle.

hex_incenter.png

Related postsThe post Random hexagon fractal first appeared on John D. Cook.
External Content
Source RSS or Atom Feed
Feed Location http://feeds.feedburner.com/TheEndeavour?format=xml
Feed Title John D. Cook
Feed Link https://www.johndcook.com/blog
Reply 0 comments