tags:

views:

23

answers:

1

Consider a WPF Rectangle filled with some ImageBrush. Now consider an arbitrary axis through rectangle center. I want to apply a 3D-like rotation around the axis employing only 2D transformations. Basically, I want to achieve perspective with "closer" edge of rectangle to appear larger than the "far" edge which should be visually smaller.

If I replacedRectangle for a Polygon I could simulate this easily but I am not sure if there is a way to distort the ImageBrush so that a 3D effect is achieved.

If it doesn't make sense to do simulated 3D using only 2D transformation, can somebody please suggest a simple but pure 3D solution?

+1  A: 

That kind of effect is not mathematically possible with linear transformation.

http://en.wikipedia.org/wiki/Linear_transformation

CommanderZ
Thanks. I was hoping for perspective-like effect, not necessarily the real thing, only to avoid 3D involvement. If 3D needs to be used, I would like to get a simple sample of how it should be done.
wpfwannabe