The main process is now complete.
[master-thesis.git] / Parasitemia / Parasitemia / EEOver.fs
index 640d752..52b5963 100644 (file)
@@ -718,4 +718,10 @@ let EEOverlapArea (e1: Types.Ellipse) (e2: Types.Ellipse) : (float * float[] * f
                 | _ -> -1.0
             if nintpts = 0
             then Some (area, [||], [||])
-            else Some (area, xint.[..nintpts-1], yint.[..nintpts-1])
\ No newline at end of file
+            else 
+                let xTransform = Array.zeroCreate nintpts
+                let yTransform = Array.zeroCreate nintpts
+                for i in 0 .. (nintpts - 1) do
+                    xTransform.[i] <- cos phi_1 * xint.[i] - sin phi_1 * yint.[i] + h1
+                    yTransform.[i] <- sin phi_1 * xint.[i] + cos phi_1 * yint.[i] + k1
+                Some (area, xTransform, yTransform)
\ No newline at end of file