Chris Pelkie wrote: > >Hi There... > > > >I have problems in rendering slices of volume data. When I make plots with > >MapToPlane, Slab or Isosurface I sometimes > >get unsmooth picturesi, where even the grid is kind of visible. The effect is > >stronger on coarse grids and large gradients > >along the 45 degree line. I know this could be a problem for the renderer, > >but I know from other programs, that this > >could be solved. I experienced, that the error is greater when I import > >connection dependend data > >which is converted with "post" to position dependend data. > > > >I put two pictures on my website, which demonstrate the problem. > > > >http://www.nderberreth.de/IsoSurf.jpg > >http://www.nderberreth.de/CoarseGrid.jpg > > > >Does anyone know a solution how I can get smooth plots ???? > > > >Thank you very much !! > > In parallel, add a ShowConnections (color set to black) and Collect it with > the CoarseGrid plot. The answer should be obvious. The reason the image > looks coarse is because you are asking it to plot inherently connection > dependent data, so naturally the color is constant across a large area > (each polygon). Post'ing the data averages the values for each four > neighbors around a vertex, which is effectively a simple 2x2 box filter. > This does not increase your resolution. Look at the image with and without > Post with ShowConnections highlighting the connection boundaries to see > what it does. > > Here's the trick: you are thinking your data is connection dependent so you > are telling DX to import the grid using the same number of connection > elements as data elements. You need to fool DX by telling it to import the > same number of vertices (positions) as data elements. This will shift the > data over and down to the left half the width and height of a connection > element and then you can declare the data position dependent. Now, the four > position values will be averaged across the face of each polygon giving a > smoother appearance. > > So for example let's say you have 3x5 positions, therefore 2x4 polygons and > 2x4 data values. Simply tell DX that you have 2x4 positions and 2x4 data > elements and that the data is "dep" "positions".
When doing this, I will have to tell dx the midpoints of each cell. This will result in a slightly smaller picture, as the bondaries are cut off. But especially in my case I need to have the exact boundary of my domain, because I have multiple domains and blanked regions. The only possibility I see now is to make an lagrange transformation in my code to compute the values on the gridpoints out of the cell centered data, but this is expected to be a lot of work. I thought, there might be a module or something in DX wich will do this transformation, as we have the possibility to import cell centered (connection dep.) data. If someone has an idea how to solve this problem with DX it would be great.... Alex
