This allows one to visualize the difference in vertex location between a given Mesh/3D Model, and the resulting vertex positions after the application of a user event driven OpenCL mesh filter.
This program both meshes simultaneously, with different colored points for the visualization of the vertices of both filtered and unfiltered mesh. There are also lines which start at the origin point of the unfiltered mesh, and end at the corresponding vertices of the filtered mesh.
This is a visualization of the Mesh Jiggle OpenCL filter in particular, along with a bouncy limits physics simulation.
One interesting aspects is that the visualization of the lines can become a bit of an interactive hair simulation when applied to certain scenarios and models. In line draw mode, one has a simplistic starting point for physical simulation of a rigid hair grid, or grass and wind, etcetera.
A little re-noodling will be necessary if you wish to use different meshes or filters. I've annotated the composition to make this clearcut. One filter that has some very interesting visual results is the working version of the Noise mesh filter (check the corrected Mesh Noise filter that I've previously posted).
Use extreme caution if you decide to attempt to visualize the results of a complex model. High iteration count may crash Quartz Composer, or perhaps your entire system. This is intended for visualization of the main sample mesh grid, with the thought that one can change out filters to see the realtime difference in filter vertex displacement.
In Snow Leopard, there is a "Get Mesh Vertices" patch which allows us to determine location of a vertex on the x/y/z axises. By using Get Mesh Vertices before and after the application of a Mesh Filter on a given mesh, one can obtain both sets of coordinates. By using the iterator, different colored Sprites are placed at points corresponding to both location sets. A Line renderer is used, where the starting point corresponds to one set of coordinates, and the ending point corresponds with the other set.
This example is also a physics simulation through the incorporation of the Bouncy Limits macro, which limits the range which one can "toss" the mesh, and adds other physic simulation parameters like bounce, friction, and springiness.