The Image MeshWarp Applet



<Shift-Click> toggles the grid visibility




This is an implementation of a meshwarping algorithm, using polygon scan conversion with texture mapping to produce the warped image. On release of the mouse button after modifying the position of a vertex, the four affected polygons incident on the modified vertex are rendered with a relatively standard Bresenham incremental scanline conversion algorithm, using the initial fixed grid polygons of the image as textures to be mapped onto the new polygons. The algorithm is lossy, in that the texture mapping does not integrate areas of the source textures to produce pixel values. The texture mapping is also prone to distortion along the edges of adjacent polygons, which can produce unrealistic results. Vertex adjustments are reversible and idempotent. Ultimately, it's more toy than serious graphics tool...but fun nonetheless.

I would appreciate your comments.


Using the Image MeshWarp Applet


Parameters
imageThe source image
gridDimensionThe grid spacing dimension in pixels
gridColorThe RGB color of the grid lines in hexadecimal format (with no leading 0x)
selectionColorThe RGB color of the grid lines, when selected