views:

48

answers:

2

I need to create 3d depth effect for my image. Number 1 is what I have and number 2 is shape where I want to transform number 1. So is there any method for that in Java standard graphics libraries or some other open source libraries?

alt text

A: 

If you want to do a lot of fast drawing in 3D then I'd suggest looking into a 3D rendering solution such as OpenGL / JOGL.

If it is just a quick one-off transformation then you can simulate this pretty easily by

  • Looping over all the lines in 2.
  • Scaling the corresponding line in 1. and drawing it over the line in 2, stretching it to the right proportion (you'll need some basic maths to work this out)
mikera
+2  A: 
aioobe
Thanx for help, but I didn't find any example how to use JAI perspective transformation, and it's JavaDocs are pretty uninformative...
newbie