|
81 | 81 | "# Generate surface data:\n", |
82 | 82 | "view_width = 600\n", |
83 | 83 | "view_height = 400\n", |
84 | | - "nx, ny = (20, 20)\n", |
| 84 | + "nx, ny = (24, 20)\n", |
85 | 85 | "xmax=1\n", |
86 | 86 | "x = np.linspace(-xmax, xmax, nx)\n", |
87 | 87 | "y = np.linspace(-xmax, xmax, ny)\n", |
|
91 | 91 | "\n", |
92 | 92 | "\n", |
93 | 93 | "# Generate scene objects from data:\n", |
94 | | - "surf_g = SurfaceGeometry(z=list(z[::-1].flat), \n", |
| 94 | + "surf_g = SurfaceGeometry(z=list(z.flat), \n", |
95 | 95 | " width=2 * xmax,\n", |
96 | 96 | " height=2 * xmax,\n", |
97 | 97 | " width_segments=nx - 1,\n", |
98 | 98 | " height_segments=ny - 1)\n", |
99 | 99 | "\n", |
100 | 100 | "surf = Mesh(geometry=surf_g,\n", |
101 | | - " material=MeshLambertMaterial(map=height_texture(z[::-1], 'YlGnBu_r')))\n", |
| 101 | + " material=MeshLambertMaterial(map=height_texture(z, 'YlGnBu_r')))\n", |
102 | 102 | "\n", |
103 | 103 | "surfgrid = SurfaceGrid(geometry=surf_g, material=LineBasicMaterial(color='black'),\n", |
104 | 104 | " position=[0, 0, 1e-2]) # Avoid overlap by lifting grid slightly\n", |
|
155 | 155 | "metadata": {}, |
156 | 156 | "outputs": [], |
157 | 157 | "source": [ |
158 | | - "surf_g.z = list((-z[::-1]).flat)\n", |
159 | | - "surf.material.map = height_texture(-z[::-1])" |
| 158 | + "surf_g.z = list((-z).flat)\n", |
| 159 | + "surf.material.map = height_texture(-z)" |
160 | 160 | ] |
161 | 161 | }, |
162 | 162 | { |
|
0 commit comments