Changes a n x n lattice to be (n*2)x(n*2) in size :-)

More usefully, it maps a 2-D lattice to one which has each element replicated four times, so that LatToGeom will attempt to render each of the orignal elements as a patch of colour, and not just as a vertex, contributing colour to a synthesised patch. This obviosuly only works when you ask LatToGeom to draw the 2D (filled colour) representation !

A diagram should help explain :

------------- A----B----C | 1 | 2 | 3 | | 1 | 2 | ------------- D----E----F --> | 4 | 5 | 6 | | 3 | 4 | ------------- G----H----I | 7 | 8 | 9 | ------------- Original (3x3) New (6x6)

In the above diagram, the numbers represent the surfaces, as coloured by LatToGeom, and the letters correspond to the elements in the original lattices. As you can see on the right, each element in the new lattice will get a single coloured patch. The new lattice is 6x6 as VertToSurf replicates points in an attempt to have a steady colour across the surface.

Useful when your lattice represents colours at array centres, and you want to display the lattice as such.

This is pretty cludgy code, but supports input 2-D lattices (of any type), curvilinear or uniform, with any number of vars.

Uniform lattices are converted to perimiter ones, and the centre of the square patches is placed where the vertex was before.

Curvilinear lattices are more complex, alas. Basically, the CORNERS of the new patches are placed where the vertices were before. Also, since it is not clear where the edge of the last patch should be placed (its like an extension of the `lamp-posts and gaps' problem- you have n values, but need to have n+1 boundaries, or lamp-posts), it's position is extrapolated, which may, or may not be correct. This approach is fine when the underlying lattice IS actually regular, but has coordinates at each point (e.g. the sort of thing you get when OrthoSlice generates curvilinear lattices), but may now work otherwise.

Normal usage would be something like :

ReadLat --> OrthoSlice ---> VertToSurf ----> LatToGeom -----> Render | ^ | | ---------> GenerateColormap---------------------

.... ----> DisplaceLat ----> VertToSurf -----> LatToGeom ----> ..... .... ---->


Port: VertArray
Type: Lattice
Constraints: 2-D.
The input lattice - uniform and curvilinear supported



Port: Output
Type: Lattice
Constraints: perimeter..curvilinear.
The resultant (larger) lattice


The curvilinear thing is a bit cludgy - however, `guessing' where the corners of the generated patches should be is a non-trivial problem.

Also, I should put in support for perimeter input lattices.


LatToGeom OrthoSlice DisplaceLat
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1996