- xyz_wf (z, [y, x] [,scale = 1.0])
Returns a 3-by-ni-by-nj array whose 0

^{th}entry is x, 1^{th}entry is y, and 2^{th}entry is z. z is ni-by-nj. x and y, if present, must be the same shape. If not present, integer ranges will be used to create an equally spaced coordinate grid in x and y. The function which scales the ``topography'' of z(x,y) is potentially useful apart from plwf.For example, the xyz array used by plwf can be converted from a quadrilateral mesh plotted using plf to a polygon list plotted using plfp like this:

- xyz= xyz_wf(z,y,x,scale=scale)
- ni= z.shape[1]
- nj= z.shape[2]
- list = ravel (add.outer (
- ravel(add.outer (adders,zeros(nj-1, Int))) +
- arange((ni-1)*(nj-1), typecode = Int),
- array ( [[0, 1], [nj + 1, nj]])))
- xyz=array([take(ravel(xyz[0]),list),
- take(ravel(xyz[1]),list),
- take(ravel(xyz[2]),list)])
- nxyz= ones((ni-1)*(nj-1)) * 4;
The resulting array xyz is 3-by-(4*(nj-1)*(ni-1)). xyz[0:3,4*i:4*(i+1)] are the clockwise coordinates of the vertices of cell number i.

[Top] [Prev] [Next] [Bottom]

support@icf.llnl.gov