nothing to say
This commit is contained in:
parent
965b41fa35
commit
e45ef4e12b
|
@ -2,11 +2,11 @@ import numpy as np
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
|
||||||
|
|
||||||
def update_border(voxel_values, xy=None):
|
def update_border(voxel_values, idx=None):
|
||||||
|
|
||||||
voxel_values = voxel_values > 0
|
voxel_values = voxel_values > 0
|
||||||
|
|
||||||
if xy is None:
|
if idx is None:
|
||||||
x_m1 = voxel_values[1:, :, :]
|
x_m1 = voxel_values[1:, :, :]
|
||||||
x_m1 = np.concatenate((x_m1, np.zeros((1, x_m1.shape[1], x_m1.shape[2]))), axis=0)
|
x_m1 = np.concatenate((x_m1, np.zeros((1, x_m1.shape[1], x_m1.shape[2]))), axis=0)
|
||||||
|
|
||||||
|
@ -29,6 +29,8 @@ def update_border(voxel_values, xy=None):
|
||||||
voxel_values != y_m1, voxel_values != y_p1,
|
voxel_values != y_m1, voxel_values != y_p1,
|
||||||
voxel_values != z_m1, voxel_values != z_p1))
|
voxel_values != z_m1, voxel_values != z_p1))
|
||||||
|
|
||||||
|
# TODO: update only concidered voxels (idx)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
voxel_values = np.array([[[np.sqrt(x**2 + y**2 + z**2) < 20 for z in np.arange(-10, 10, 1.0)] for y in np.arange(-10, 10, 1.0)] for x in np.arange(-10, 10, 1.0)])
|
voxel_values = np.array([[[np.sqrt(x**2 + y**2 + z**2) < 20 for z in np.arange(-10, 10, 1.0)] for y in np.arange(-10, 10, 1.0)] for x in np.arange(-10, 10, 1.0)])
|
||||||
|
|
Loading…
Reference in a new issue