Commit 81574689 authored by Luke Campagnola's avatar Luke Campagnola
Browse files

Fixed GLSurfacePlot bug

parent 63c3b36a
...@@ -62,7 +62,7 @@ w.addItem(p3) ...@@ -62,7 +62,7 @@ w.addItem(p3)
## Animated example ## Animated example
## compute surface vertex data ## compute surface vertex data
cols = 100 cols = 90
rows = 100 rows = 100
x = np.linspace(-8, 8, cols+1).reshape(cols+1,1) x = np.linspace(-8, 8, cols+1).reshape(cols+1,1)
y = np.linspace(-8, 8, rows+1).reshape(1,rows+1) y = np.linspace(-8, 8, rows+1).reshape(1,rows+1)
......
...@@ -127,8 +127,8 @@ class GLSurfacePlotItem(GLMeshItem): ...@@ -127,8 +127,8 @@ class GLSurfacePlotItem(GLMeshItem):
def generateFaces(self): def generateFaces(self):
cols = self._z.shape[0]-1 cols = self._z.shape[1]-1
rows = self._z.shape[1]-1 rows = self._z.shape[0]-1
faces = np.empty((cols*rows*2, 3), dtype=np.uint) faces = np.empty((cols*rows*2, 3), dtype=np.uint)
rowtemplate1 = np.arange(cols).reshape(cols, 1) + np.array([[0, 1, cols+1]]) rowtemplate1 = np.arange(cols).reshape(cols, 1) + np.array([[0, 1, cols+1]])
rowtemplate2 = np.arange(cols).reshape(cols, 1) + np.array([[cols+1, 1, cols+2]]) rowtemplate2 = np.arange(cols).reshape(cols, 1) + np.array([[cols+1, 1, cols+2]])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment