shwetashweta05 commited on
Commit
00d1831
Β·
verified Β·
1 Parent(s): 186aef5

Update pages/Transformation.py

Browse files
Files changed (1) hide show
  1. pages/Transformation.py +72 -5
pages/Transformation.py CHANGED
@@ -40,15 +40,82 @@ st.code(code,language="python")
40
  st.write("""
41
  Where:
42
 
43
- π‘₯
44
  x: Input vector (original point coordinates).
45
 
46
- 𝑦
47
  y: Output vector (transformed point coordinates).
48
 
49
- 𝐴
50
  A: Transformation matrix (2x2 for 2D transformations).
51
 
52
- 𝑏
53
  b: Translation vector.
54
- """)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  st.write("""
41
  Where:
42
 
 
43
  x: Input vector (original point coordinates).
44
 
 
45
  y: Output vector (transformed point coordinates).
46
 
 
47
  A: Transformation matrix (2x2 for 2D transformations).
48
 
 
49
  b: Translation vector.
50
+ """)
51
+ code=Example in 2D:
52
+ Let
53
+ π‘₯
54
+ =
55
+ [
56
+ π‘₯
57
+ 𝑦
58
+ ]
59
+ x=[
60
+ x
61
+ y
62
+ ​
63
+ ], the affine transformation can be written as:
64
+
65
+ [
66
+ π‘₯
67
+ β€²
68
+ 𝑦
69
+ β€²
70
+ ]
71
+ =
72
+ [
73
+ π‘Ž
74
+ 𝑏
75
+ 𝑐
76
+ 𝑑
77
+ ]
78
+ β‹…
79
+ [
80
+ π‘₯
81
+ 𝑦
82
+ ]
83
+ +
84
+ [
85
+ 𝑑
86
+ π‘₯
87
+ 𝑑
88
+ 𝑦
89
+ ]
90
+ [
91
+ x
92
+ β€²
93
+
94
+ y
95
+ β€²
96
+
97
+ ​
98
+ ]=[
99
+ a
100
+ c
101
+ ​
102
+
103
+ b
104
+ d
105
+ ​
106
+ ]β‹…[
107
+ x
108
+ y
109
+ ​
110
+ ]+[
111
+ t
112
+ x
113
+ ​
114
+
115
+ t
116
+ y
117
+ ​
118
+
119
+ ​
120
+ ]
121
+ st.code(code,language="python")