Creating Skew AngleY ​​from the oblique point for a rhomboid in XAML

I'm not sure if this is possible, but basically I have two degrees that will change the width / size and skew of the image. In the transformation matrix ( <Matrix3DProjection/>), it works as follows:

M11: cos (x)    M12: sin (y) * sin (x)    M11: 0
M21: 0 M22: cos (y)           M23: 0
M31: 0 M32: 0 M33: 1 

So, if I have X = 30°u Y=40°, my matrix is:

M11: 0.866     M12: 0.321            M11: 0
M21: 0 M22: 0.766            M23: 0
M31: 0 M32: 0 M33: 1 

So it normalbecomes30x40

<TransformGroup/>, <SkewTransform AngleY="???"/>. <ScaleTransform/> , M11 M22 ScaleX ScaleY <ScaleTransform ScaleX=".866" ScaleY=".766"/>.

AngleY <SkewTransform/> M12 0.321. , - , AngleY="20.3" . .

- ?

+3
2

Reflector SkewTransform, . Matrix.Skew, :

1.0           tan(skewY)    0.0
tax(skewX)    1.0           0.0

tan(skewY) * 0.766 = 0.321, skewY = atan(0.321 / 0.766) = 22.7366108 degrees. , , skewY = atan(sin(y) * sin(x) / cos(y)) = atan(tan(y) * sin(x)), atan(tan(40 degrees) * sin(30 degrees)) = 22.7604763 degrees.

+3

, Projection RenderTransform?

, , ScaleTransform SkewTransform, MatrixTransform RenderTransform.

 <MatrixTransform Matrix=".866, .321, 0, .766, 0, 0" />

 <MatrixTransform M11="0.866" M12="0.321", M22="0.766" />
0

Source: https://habr.com/ru/post/1754177/


All Articles