Anonymous avatar Anonymous committed ae98251

change to follow newly derived a,b,c <> 0 projection

Comments (0)

Files changed (1)

                 if not is_zero(b):
                         if not is_zero(c):
                                 # a,b,c <> 0
-                                a_ = float(b**2 + c**2) / a
-                                b_ = float(a**2 + c**2) / b
+                                _a = (-1 * b**2 - c**2) / a
+                                _b = (-1 * a**2 - c**2) / b
 
-                                k = 1.0 / ((a_**2)*(b_**2)-(a**2)*(b**2) + (a_**2)*(c**2) + (b_**2)*(c**2) - 3*(b**2)*(c**2) - 3*(a**2)*(c**2)-6*(c**2))
+                                d = float(a**2 + b**2 + c**2) / a
+                                dbar = float(a**2 - b**2 - c**2) / a
 
-                                o = -1*(c**2)*(a-a_)*(b-b_)
+                                e = float(a**2 + b**2 + c**2) / b
+                                ebar = float(b**2 - a**2 - c**2) / b
 
-                                m = [[k*((a_**2)*(b_**2 + c**2) - (b**2 + c**2)*(a**2 + 4*(c**2))),k*o,0],[k*o,k*((b_**2)*(a_**2+c**2) - (a**2+c**2)*(b**2+4*(c**2))),0],[0,0,1]]
+                                f = a*b - _a*_b
+                                fbar = a*b + _a*_b
+
+                                k = 1.0 / (f*fbar + (c**2)*(a**2 + b**2 + _a**2 + _b**2)+2*(c**4))
+
+                                m = [[-1*k*(f*fbar + (c**2)*d*dbar), -1*k*(c**2)*d*e, 0],[-1*k*(c**2)*d*e,-1*k*(f*fbar + (c**2)*e*ebar),0],[0, 0, 1]]
                         else:
                                 # c = 0
                                 k = 1.0 / ((a ** 2) + (b ** 2))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.