Fractal Dimension Documentation¶
Calculation¶
-
calc_fractal_dim(n: int, mesh)¶ Calculates the fractal dimensions for nxnxn cubes around the given mesh
-
calc_fractal_dim3D(mesh)¶ Wrapper function that calls calc_fractal_dim and narrows in on a good resolution for n
-
center_mesh(mesh, n)¶ Centers the 3d mesh in the space of our cube grid
Cubes¶
-
class
Cubes(n)¶ This is a utility class to create a grid of cubes around a 3D mesh for the purposes of calculating the fractal dimension. .. attribute:: n
number of sides on each face.
type: int -
r¶ Controls the radius of the cubes. Don’t touch this.
Type: float
-
cube_array¶ Shared memory array for multiprocessing.
Type: array
-
cubes¶ Array of cubes tracking whether we’ve intersected them.
Type: array
-
xy_rays¶ Array of vectors used for raycasting the mesh vertices into faces of the cubes.
Type: array
-
xz_rays¶ Array of vectors used for raycasting the mesh vertices into faces of the cubes.
Type: array
-
yz_rays¶ Array of vectors used for raycasting the mesh vertices into faces of the cubes.
Type: array
-
max_t¶ Maximum number of supported threads on the system.
Type: int
-
available_threads¶ Current number of available threads.
-
check_bounds(verts, isec)¶ Validates the bounds of the intersection with the min/max values of the min/max values of the mesh.
-
check_intersection_xy(isec, xy, verts)¶ Checks for intersections of a specifiy ray on the xy plane for the mesh
-
check_intersection_xz(isec, xz, verts)¶ Checks for intersections of a specifiy ray on the xz plane for the mesh
-
check_intersection_yz(isec, yz, verts)¶ Checks for intersections of a specifiy ray on the yz plane for the mesh
-
generate_grid()¶ Generates cubes to be drawn in pyplot
-
generate_xy_rays()¶ Populates the xy_rays array with raycasting vectors on the xy plane from 0 to n
-
generate_xz_rays()¶ Populates the xz_rays array with raycasting vectors on the xz plane from 0 to n
-
generate_yz_rays()¶ Populates the yz_rays array with raycasting vectors on the yz plane from 0 to n
-
intersect_partition(verts, part, count, mutex)¶ Threaded portion of the mesh intersection
-
intersect_xy(verts)¶ This method checks for intersections with the xz vectors. It marks the cubes as intersected and returns the number of intersections.
-
intersect_xz(verts)¶ This method checks for intersections with the xz vectors. It marks the cubes as intersected and returns the number of intersections.
-
intersect_yz(verts)¶ This method checks for intersections with the yz vectors. It marks the cubes as intersected and returns the number of intersections.
-
sub_generate_xy_rays(x, queue)¶ Subprocess for generating xy rays.
-
sub_generate_xz_rays(x, queue)¶ Subprocess for generating xz rays.
-
sub_generate_yz_rays(y, queue)¶ Subprocess for generating yz rays.
-
sub_intersect_xy(x, p, min_verts, max_verts)¶ Subprocess for calculating intersections on the xy plane.
-
sub_intersect_xz(x, p, min_verts, max_verts)¶ Subprocess for calculating intersections on the xz plane.
-