Changeset 2265
 Timestamp:
 Jan 23, 2006, 10:30:18 AM (18 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

inundation/pyvolution/vtk_realtime_visualiser.py
r2221 r2265 5 5 import Tkinter 6 6 import vtk 7 from Numeric import * 7 8 from vtk.tk.vtkTkRenderWidget import vtkTkRenderWidget 8 9 … … 116 117 117 118 self.N_tri = len(self.domain.triangles) 119 self.N_vert = len(self.vertices) 118 120 self.cells = vtk.vtkCellArray() 119 121 self.vertices = self.domain.get_vertex_coordinates() 120 self.vert_index = {} 121 122 for n in range(len(self.vertices)): 122 self.vert_index = zeros((self.N_vert,2), Float) 123 for n in range(self.N_vert): 123 124 for i in range(3): 124 125 self.vert_index[self.domain.triangles[n][i]] = self.vertices[n][i*2:i*2+2] 125 126 self.N_vert = len(self.vert_index.keys())127 126 128 127 # Prepare the list of cells … … 138 137 139 138 def draw_quantity(self, q): 140 qty_index = {}139 qty_index = zeros(self.N_vert, Float) 141 140 for n in range(self.N_tri): 142 141 for v in range(3): … … 201 200 def shutdown(self): 202 201 self.domain.visualise = False 202 self.idle.set() 203 203 self.root.withdraw() 204 204 self.root.quit()
Note: See TracChangeset
for help on using the changeset viewer.