Sierpinski Tetrahedron (Tetrix) C++ Code

I modified my Sierpinski triangle code from a previous posting to work in three dimensions instead of two. The result is a short C++ program which will generate all the points of the Sierpinski tetrahedron and write them to stdout (you can redirect to a file).

Below is the obligatory image. This doesn’t look great but if you plot it yourself in gnuplot or some other package, you can probably get a prettier looking picture.

Sierpinski Tetrahedron


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s