I want to use vpython to generate a pyramid fractal using algorithms. So basically once i have the fractal pyramid i need to also generate more pyramids in a similar manner. I'm really struggling with this and would like some help.

So something like this for examble

Set up initial pyramid

def subdivide(big_pyramid, subdivisions_remaining)

if subdivisions_remaining < 1:

draw big_pyramid

Create 5 small pyramids based on big_pyramid

for each small pyramid:

subdivide(the small pyramid, subdivisions_remaining - 1)

subdivide(initial pyramid, number of subdivisions)

Obviously this isn't right and i'm missing a lot of parts. For the pyramid i need 5 points, so in vypthon i basically need to draw lines going from each point creating the 3d figure and then create the fractal which i believe copies it. If anyone can help me out with this that would be great. I can provide much more information if this is lacking.

I am also willing to pay.