tequal aspec ratio in color cubes - sphere - GPU-based 3D discrete element meth… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 98c2f4e4ef7ed8a2669c5bedbed4c2e6e55d99ac | |
parent c8dc961f462de20dd337b2aa60244bf504b5bd7b | |
Author: Anders Damsgaard <[email protected]> | |
Date: Sat, 21 Jun 2014 21:27:24 +0200 | |
equal aspec ratio in color cubes | |
Diffstat: | |
M python/shortening.py | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/python/shortening.py b/python/shortening.py | |
t@@ -111,12 +111,12 @@ sim.cleanup() | |
sim.initTemporal(current=0.0, total=5.0, file_dt = 0.01) | |
# set colors again | |
-color_ny = 6 | |
-color_nz = 50 | |
y_min = numpy.min(sim.x[:,1]) | |
y_max = numpy.max(sim.x[:,1]) | |
z_min = numpy.min(sim.x[:,2]) | |
z_max = numpy.max(sim.x[:,2]) | |
+color_ny = 6 | |
+color_nz = int((z_max - z_min)/(y_max - y_min)*color_ny) | |
color_dy = y_max/color_ny | |
color_dz = z_max/color_nz | |
color_y = numpy.arange(0.0, y_max, ny) |