Public Group

# Calculating the number of unique vertices in a Serpinski triangle

This topic is 3630 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I am in the process of creating a program to Create and render a Serpinski triangle given x iterations and the position of the three vertices of the triangle. The only problem I am having is figuring out how to calculate the amount unique vertices (not indices) in all the triangles that make up my Serpinski triangle. I know that the amount of indices is 3^iterations, so can I use this value to calculate the amount of vertices or is there another way to find it?

##### Share on other sites
Im pretty sure there is 3 per triangle. I dont notice any shared vertices but I could be really bad at conceptualizing/anaylizing.

##### Share on other sites
Well, because the triangles in a serpinski triangle share vertices with triangles that are adjacent to them, there are not 3 unique vertices for each triangle.

##### Share on other sites
I thought the triangles were made with vertices in the center of the triangles edges.

OH. I just realized that interior ones will be the same as some exteriors. Silly me!

##### Share on other sites
Off the top of my head: an (n) Serpinski triangle consists of three (n - 1) triangles. These three triangles share three vertices. So if an (n) triangle has f(n) unique vertices then an (n + 1) triangle should have (3 * f(n) - 3) unique vertices. The base triangle has three unique vertices. So you have the recurrance relation:

f(0) = 3
f(n) = 3 * f(n - 1) - 3

##### Share on other sites
Which, when solved, gives f(n) = 3/2 * (3^n + 1).

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633729
• Total Posts
3013578
×