December 10th, 2013, 01:30 AM
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.
Set up initial pyramid
def subdivide(big_pyramid, subdivisions_remaining)
if subdivisions_remaining < 1:
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.
December 10th, 2013, 07:43 AM
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.
[/code] are essential for python code and Makefiles!