A program that generates a picture of the n-th iteration of the barycentric subdivision of a triangle

StackOverflow https://stackoverflow.com/questions/4516861

  •  12-10-2019
  •  | 
  •  

Question

I am a mathematician, and I understand that the following assignment is often given to introductory computer science students:

Write an application in language X that draws the nth iteration of barycentric subdivision of a triangle (2-simplex) for each natural number n.

(See this Google search for evidence that this is actually something that people assign)

I have a use for such a program in my research, and I was hoping that one of you had a copy of a source or binary version from when you were students (or for those of you who are professors, if you had one you'd written yourselves).

By the nth barycentric subdivision, I mean the figure that results from applying the same barycentric subdivision process again to each 2-simplex of the resulting 2-dimensional simplicial complex.

If that is too much to ask, would it be too much to ask for a fairly high resolution picture of the 4th iteration ? I have tried drawing it by hand, but it's really difficult (my best attempt was an abortive attempt at the third subdivision, and that took over an hour)!

Yours cordially,

Anon

Was it helpful?

Solution

Here you have a program (in Mathematica, what better) and some nice pictures. I guess you'll have to adapt the program to your current needs.

HTH!

alt text

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top