OSDN Git Service

3 to 4
[psychlops/silverlight.git] / dev3 / psychlops / extention / standard / figures.cs
diff --git a/dev3/psychlops/extention/standard/figures.cs b/dev3/psychlops/extention/standard/figures.cs
deleted file mode 100644 (file)
index a7a8273..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-\r
-using System.Windows.Media.Imaging;\r
-namespace Psychlops\r
-{\r
-\r
-    public static class Figures\r
-    {\r
-\r
-               public static void drawGrating(ref Image img, int width, int height, double wavelength, double contrast, double orientation, double phase)\r
-           {\r
-                       double width_half = width / 2.0, height_half = height / 2.0;\r
-            if (img==null || img.width != width || img.height != height)\r
-                img = new Image(width, height);\r
-            double freq = 2 * Math.PI / wavelength;\r
-                       img.field(\r
-                               (x, y) => new Color(.5 +.5 * Math.sin(phase + (Math.sin(orientation)*x-Math.cos(orientation)*y) * freq))\r
-                       );\r
-           }\r
-               public static void drawGaussian(ref Image img, double sigma, double factor)\r
-               {\r
-                       int width = (int)(sigma * 8), height = (int)(sigma * 8);\r
-                       double width_half = width / 2.0, height_half = height / 2.0;\r
-                       if (img == null || img.width != width || img.height != height)\r
-                               img = new Image(width, height);\r
-                       img.field(\r
-                               (x, y) => new Color(factor * Math.gaussian(Math.radius(x - width_half, y - height_half), width / 8.0))\r
-                       );\r
-               }\r
-\r
-               public static void drawGabor(ref Image img, double sigma, double wavelength, double contrast, double orientation, double phase)\r
-           {\r
-            int width = (int)(sigma * 8), height = (int)(sigma * 8);\r
-                       double width_half = width / 2.0, height_half = height / 2.0;\r
-            if (img==null || img.width != width || img.height != height)\r
-                img = new Image(width, height);\r
-            double freq = 2 * Math.PI / wavelength;\r
-                       img.field(\r
-                               (x, y) => new Color(.5 + Math.gaussian(Math.radius(x - width_half, y - height_half), width / 8.0) * .5 * Math.sin(phase + (Math.sin(orientation)*x-Math.cos(orientation)*y) * freq))\r
-                       );\r
-           }\r
-\r
-    }\r
-}\r