Skip to content

Make modified Mandelbrot fractals in 3d by changing the complex number equation and alternating the params. Stack several fractals together to make an environment.

Notifications You must be signed in to change notification settings

nicenustian/mandelbrot-3d-fractals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

Create minecraft like structures with modified mandelbrot fractals in 3d

set params manually or get random fractals

voxel_rotation2 mandel_N128_pow3_val2_iter256_off 0, 0, 0

mandel_N51_pow2_val1_iter23_off 0 0 0 mandel_N32_pow2_val1_iter101_off 2 2 0 mandel_N27_pow2_val1_iter188_off 1 0 0 mandel_N64_pow2_val2_iter16_off 1, 0, 1 mandel_N128_pow2_val2_iter8_off 1, 0, 1 mandel_N34_pow2_val1_iter194_off 1 1 0 mandel_N64_pow2_val2_iter2_off 0, 1, 1

Manual set the params

    # Uncomment if you wan to generate fractals with constant params
    # provide lists one value for each fractal
    # size of grid for given fractal
    grids = [64]
    # max tieration for a given pixel
    max_iters = [8]
    # power of the complex number
    powers = [1]
    #abs values for cut off for fractals 
    abs_values = [2]
    # offset in the real space x,y,z
    off = [[0,0,0]]
    # offset in the plotting the fractal
    offset = [[0,0,0]]
    num_voxels = len(grids)

Random fractals stacked together

    # Uncomment if you wan to generate fractals with random params
    # number of fractals, all fractals would be stack 
    # together with offets provided
    num_voxels = 4
    # size of grid for given fractal
    grids = np.sort(np.random.randint(8, 64, size=num_voxels))
    max_iters = np.random.randint(8, 256, size=num_voxels)
    powers = np.sort(np.random.randint(1, 3, size=num_voxels))
    offset = np.random.randint(0, np.max(grids), size=(num_voxels, 3))
    off = np.random.randint(0, 3, size=(num_voxels, 3))
    abs_values = np.random.randint(1, 2, size=num_voxels)

Change Equations (volcanic, symmetric)

                # valcanic type shapes
                mandelbrot_data[i, j, k] = \
                    mandel(complex(cz*cx*cz, cz*cy*cz), power, max_iter)
                
                # valcanic type shapes
                mandelbrot_data[i, j, k] = \
                    mandel(complex(cz*cx*cz*cz, cz*cy*cz*cz), power, max_iter)

                #symmteric shapes
                #mandelbrot_data[i, j, k] = \
                #    mandel(complex(cx*cy*cz, cz*cx*cy), power, max_iter)
    
                #mandelbrot_data[i, j, k] = \
                #    mandel(complex(cz*cx*cx, cz*cx*cx), power, max_iter)
                

About

Make modified Mandelbrot fractals in 3d by changing the complex number equation and alternating the params. Stack several fractals together to make an environment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages