List Info

Thread: displacement map question




displacement map question
user name
2006-09-12 22:12:04
I apologize up front if this post is vague. My last trig
lessons were  
35 years ago.

I've been reading Anthony's examples on displacement maps.

I'm working on an script that uses a displacement map to
"bend" an  
image, that is, to make the left side of the image curve
inward and  
the right side to curve outward, while leaving the top and
bottom  
straight and parallel. If I use a displacement map with a
gradient  
that changes linearly from black in the middle to gray50 on
the top  
and bottom, the image sides become v-shaped, not curved. (I
hope this  
is clear.)

Instead of changing linearly, the intensities in the
gradient must  
change on a curve, that curve being part of the perimeter of
a circle  
having a specified radius. The radius of the circle defines
how deep  
the curves on the sides are.

I have code that produces the displacement map using some
simple trig  
functions to compute each intensity, but it seems to me that
this  
problem is probably already has a solution and I'm just
ignorant of  
it. Is there a function in ImageMagick that will produce
such a  
displacement map?

If necessary I can produce the code (it's in Ruby) and the
map I've  
got now.
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
displacement map question
user name
2006-09-13 00:40:21
Timothy Hunter on  wrote...
| I apologize up front if this post is vague. My last trig
lessons were  
| 35 years ago.
| 
| I've been reading Anthony's examples on displacement
maps.
| 
| I'm working on an script that uses a displacement map to
"bend" an  
| image, that is, to make the left side of the image curve
inward and  
| the right side to curve outward, while leaving the top and
bottom  
| straight and parallel. If I use a displacement map with a
gradient  
| that changes linearly from black in the middle to gray50
on the top  
| and bottom, the image sides become v-shaped, not curved.
(I hope this  
| is clear.)
| 
| Instead of changing linearly, the intensities in the
gradient must  
| change on a curve, that curve being part of the perimeter
of a circle  
| having a specified radius. The radius of the circle
defines how deep  
| the curves on the sides are.
| 
| I have code that produces the displacement map using some
simple trig  
| functions to compute each intensity, but it seems to me
that this  
| problem is probably already has a solution and I'm just
ignorant of  
| it. Is there a function in ImageMagick that will produce
such a  
| displacement map?
| 
| If necessary I can produce the code (it's in Ruby) and
the map I've  
| got now.


Perhaps you can place some examples online, original, what
you want,
what you get, how you generate the displacement map.

If you don't have a web site the IM site has a image
gallery..
Hmmm strange, I can't seem to find a pointer to it.

Does anyone know where it is?

  Anthony Thyssen ( System Programmer )    <A.Thyssengriffith.edu.au>
 -----------------------------------------------------------
------------------
  Did you ever have the feeling that the world was an AC
coffee pot
  and you were DC?                -- Dean Alan Foster, ``
Glory Lane ''
 -----------------------------------------------------------
------------------
     Anthony's Home is his Castle     http://www.cit.gu.
edu.au/~anthony/
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
displacement map question
user name
2006-09-14 22:57:36
On Sep 12, 2006, at 8:40 PM, Anthony Thyssen wrote:

> Timothy Hunter on  wrote...
> | I apologize up front if this post is vague. My last
trig lessons  
> were
> | 35 years ago.
> |
> | I've been reading Anthony's examples on
displacement maps.
> |
> | I'm working on an script that uses a displacement
map to "bend" an
> | image, that is, to make the left side of the image
curve inward and
> | the right side to curve outward, while leaving the
top and bottom
> | straight and parallel. If I use a displacement map
with a gradient
> | that changes linearly from black in the middle to
gray50 on the top
> | and bottom, the image sides become v-shaped, not
curved. (I hope  
> this
> | is clear.)
> |
> | Instead of changing linearly, the intensities in the
gradient must
> | change on a curve, that curve being part of the
perimeter of a  
> circle
> | having a specified radius. The radius of the circle
defines how deep
> | the curves on the sides are.
> |
> | I have code that produces the displacement map using
some simple  
> trig
> | functions to compute each intensity, but it seems to
me that this
> | problem is probably already has a solution and I'm
just ignorant of
> | it. Is there a function in ImageMagick that will
produce such a
> | displacement map?
> |
> | If necessary I can produce the code (it's in Ruby)
and the map I've
> | got now.
>
>
> Perhaps you can place some examples online, original,
what you want,
> what you get, how you generate the displacement map.
>

After rather more messing about with my ISP than should be
necessary  
(and scrounging a picture of a right triangle from the web),
I've  
managed to upload a web page with the images, Ruby program,
and some  
explanation. Check out http:/
/home.nc.rr.com/foxhunter/polaroid.html.

The short version of my question is: is there a better,
simpler way  
of producing the result of the displace operation?
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )