1. No Profile Picture
Registered User
Devshed Newbie (0 - 499 posts)

Join Date
Dec 2013
Posts
1
Rep Power
0

Vpython 3D fractals help!

For my class i am suppose 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 far...

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.
2. I'd think you'd need to adjust the sizes, maybe by dividing into fifths? and also the positions of successive pyramids. Oh, and you'll need to also figure out how to draw a pyramid.

vpython looks awesome. Thanks.