Changeset 1644
- Timestamp:
- 02/25/10 13:12:08 (5 months ago)
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/yt-1.6/yt/extensions/volume_rendering/software_sampler.py
r1618 r1644 31 31 partitioned_grids = None, field = 'Density', 32 32 log_field = True, whole_box=False, 33 nsamples = 5 ):33 nsamples = 5, x_vec = None, y_vec = None): 34 34 center = na.array(center, dtype='float64') 35 35 36 36 # This just helps us keep track of stuff, and it's cheap 37 37 cp = pf.h.cutting(L, center) 38 if x_vec is None: x_vec = cp._x_vec 39 if y_vec is None: y_vec = cp._y_vec 38 40 back_center = center - cp._norm_vec * na.sqrt(3) * W 39 41 front_center = center + cp._norm_vec * na.sqrt(3) * W … … 77 79 78 80 vp = VectorPlane(vectors, norm_vec, back_center, 79 (xp0, xp1, yp0, yp1), image, cp._x_vec, cp._y_vec)81 (xp0, xp1, yp0, yp1), image, x_vec, y_vec) 80 82 81 tf.light_dir = cp._norm_vec + 0.5 * cp._x_vec + 0.5 * cp._y_vec83 tf.light_dir = cp._norm_vec + 0.5 * x_vec + 0.5 * y_vec 82 84 cx, cy, cz = 0.3, -0.3, 0.3 83 85 tf.light_dir = (cp._inv_mat[0,0]*cx + cp._inv_mat[0,1]*cy + cz, -
trunk/yt/extensions/volume_rendering/software_sampler.py
r1629 r1644 31 31 partitioned_grids = None, field = 'Density', 32 32 log_field = True, whole_box=False, 33 nsamples = 5 ):33 nsamples = 5, x_vec = None, y_vec = None): 34 34 center = na.array(center, dtype='float64') 35 35 36 36 # This just helps us keep track of stuff, and it's cheap 37 37 cp = pf.h.cutting(L, center) 38 if x_vec is None: x_vec = cp._x_vec 39 if y_vec is None: y_vec = cp._y_vec 38 40 back_center = center - cp._norm_vec * na.sqrt(3) * W 39 41 front_center = center + cp._norm_vec * na.sqrt(3) * W … … 77 79 78 80 vp = VectorPlane(vectors, norm_vec, back_center, 79 (xp0, xp1, yp0, yp1), image, cp._x_vec, cp._y_vec)81 (xp0, xp1, yp0, yp1), image, x_vec, y_vec) 80 82 81 tf.light_dir = cp._norm_vec + 0.5 * cp._x_vec + 0.5 * cp._y_vec83 tf.light_dir = cp._norm_vec + 0.5 * x_vec + 0.5 * y_vec 82 84 cx, cy, cz = 0.3, -0.3, 0.3 83 85 tf.light_dir = (cp._inv_mat[0,0]*cx + cp._inv_mat[0,1]*cy + cz,
