Simulating perspective by rotating an image filled rectangle using 2D transforms
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开发者_JAVA技巧, 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?
That kind of effect is not mathematically possible with linear transformation.
http://en.wikipedia.org/wiki/Linear_transformation
精彩评论