Damir Buskulic on  wrote...
| > I myself have been using arc-tangent for generating 'wrap into a
| > circle' or 'polar function' image displacement maps...
| >   http://www.cit.gu.edu.au/~anthony/graphics/imagick6/distorts/ 
| > #map_polar
| 
| That's exactly it. I'm trying to build a displacement map to simulate  
| the projection of the image on a cylinder. It works quite well. I'll  
| send you a result of my investigations if you want.
|
Please do.

With a cylinder formular, it should be posible to even do spherical
distortions.  EG mapping Cartesian maps of a globe, back onto a sphere,
or anything else.

| By the way, your page is very interesting and corresponds greatly to  
| what I needed. Thanks ! :-)
| 
That is good to know.  I worked very hard to get what was there working.

Though I would like to do one more example with four images, all
different sizes.  A blank output sime canvas, input image, X map and Y
map images.

The resulting formula would be the final universal formula that could be
eventually programmed into IM for speed.  The final output size for example
could be specified as a '-size' setting, for the results of the other
three images.

However I am still not certian of the handling of transparency in the
formula.

| The only problem I have right now is the speed. I call those image  
| transformations from a php script, and it may take a while to  
| generate if the image is large (say 300x300, which is not that  
| large), making the web user wait. Obviously, the problem lies in the  
| complexity of the mathematical expression and in the interpretation  
| of this expression, so i'm trying to limitate the number of  
| operations. I'll see what I can do, but if you have some hints, they  
| will be welcome !
| 
The point about distortion maps is that the map can be pre-generated
You can do all the calculationed before hand, and neither the maps, nor
the input image needs to represent the final size of the image.

If this can be done then the PHP only has to do the one -fx operation.

Yes -fx is currently slow.  but Chrisy has told me he is looking into a
simple compiled solution, which interpretes the formula once, then can
run though the formula very fast for each of the values and pixels
needed to produce the result.

With that speed improvment we can even posibly add something like
raytracer 'sampling factors' to improve handling of distortions that
involve multiple pixels being compressed into one ot two pixels.



Of course all this is making displacement maps less important, with the
limitations that it has due to its implimentation as a alpha composition
method.  Though the recent updates to alpha composition masking has
broken 2 dimensional displacement maps, so that whole methodology also
needs to be re-thought, anyway.

Sorry... I ranting again.  I'll shutup now.

  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
      Zatheris good at doings,  not understandings!
                           -- Zatheris,  Bablyon 5, "War Without End"
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to