Changeset 3524
- Timestamp:
- Aug 23, 2006, 10:55:24 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/visualiser/offline.py
r3496 r3524 1 from Numeric import zeros, Float1 from Numeric import array, Float, zeros 2 2 from Scientific.IO.NetCDF import NetCDFFile 3 3 from Tkinter import Button, E, W … … 36 36 else: 37 37 N_vert = len(fin.variables[quantityName]) 38 x = fin.variables['x'] 39 y = fin.variables['y'] 40 q = fin.variables[quantityName] 41 scale = self.height_zScales[quantityName] 42 off = self.height_zScales[quantityName] 38 x = array(fin.variables['x'], Float) 39 y = array(fin.variables['y'], Float) 43 40 if dynamic is True: 44 for v in range(N_vert): 45 points.InsertNextPoint(x[v], 46 y[v], 47 q[self.frame_number][v] \ 48 * scale \ 49 + off) 41 q = array(fin.variables[quantityName][self.frame_number], Float) 50 42 else: 51 for v in range(N_vert): 52 points.InsertNextPoint(x[v], 53 y[v], 54 q[v] \ 55 * scale \ 56 + off) 43 q = array(fin.variables[quantityName], Float) 44 45 q *= self.height_zScales[quantityName] 46 q += self.height_offset[quantityName] 47 48 for v in range(N_vert): 49 points.InsertNextPoint(x[v], y[v], q[v]) 57 50 polydata = self.vtk_polyData[quantityName] = vtkPolyData() 58 51 polydata.SetPoints(points)
Note: See TracChangeset
for help on using the changeset viewer.