I’ve just started learning python. For one of my first test scripts I’ve been playing with the Mandelbrot set.
I’m sure this has been done here somewhere but it’s all new to me so I thought I would share for feedback.
Maybe someone could make a cool image with the code.
print ("-+"* 50)
ob = bpy.context.object
first function with mandelbrot equation and operator to copy objects
for h in range(0,f_range):
x = x**2 + c
copy = ob.copy()
copy.location.x = x+x30
copy.location.y = move
copy.rotation_euler.z = move.1
copy.rotation_euler.y = x10
#bpy.ops.mesh.primitive_plane_add(radius=.3, location=(x+x30, move, x+x*25))
moved = 0
y = -1.35 #initial value for equation
for i in range (0,f2_range):
moved = moved +1 f(y, y, moved,7) y = y + -f2_variation print("iterated",i) #number of iterations, amount to increase initial value
f2 (700, .001)
#with current values, numbers larger than 700 stray outside the pattern.
#!!!you must have an active object selected!!!#