"num_base_points = 200 # number of voronoi cells\n",
"resize_base_points_factor = 2 # scaling factor for base points of cells (so the boundary of the unit cube is uniformly splitted into voronoi cells)\n",
"import seaborn as sns"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"num_base_points = 1000 # number of voronoi cells\n",
"resize_base_points_factor = 2 # scaling factor for base points of cells (so the boundary of the unit cube is uniformly split into voronoi cells)\n",
"\n",
"join_cell_ratio = 0.95 # the ratio of cells which are to be joined with another\n",
"joined_cells_size_gap = 10 # the largest cell cluster is allowed 5 times the size of the smallest\n",
"\n",
"num_pixels = 25 # number of voxels per side of the unit cube\n",
"noise = 0.1 # noise in the output voxels\n",
"num_pixels = 100 # number of voxels per side of the unit cube\n",
"noise = 0.04 # noise in the output voxels\n",
"\n",
"output_scale = 255"
]
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 15,
"metadata": {
"pycharm": {
"name": "#%%\n"
...
...
@@ -56,7 +64,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -94,7 +102,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -102,6 +110,7 @@
"\n",
"facets = []\n",
"triangles = []\n",
"triangle_vertices = []\n",
"joined_cells_meshes = [[] for _ in joined_cells]\n",
"for i, ridge in enumerate(vor.ridge_vertices):\n",