3 namespace PsychlopsSilverlight3test
\r
5 public class PsychlopsMain
\r
13 public void initialize()
\r
15 cnvs = new Canvas(500, 500);
\r
16 img = new Image(isize * 2, isize * 2);
\r
17 fixation = new Rectangle(10, 10);
\r
18 cnvs.clear(Color.gray);
\r
21 public void each_frames()
\r
23 cnvs.clear(new Color(Mouse.left.pressed() ? 1.0 : 0.5));
\r
25 (x, y) => new Color(.5 + Math.gaussian(Math.radius(x - isize, y - isize), isize / 8.0) * .5 * Math.sin(cnvs.frame * 2 * Math.PI / tfreq / 60 + x / 3.0))
\r
27 img.centering(Mouse.position);
\r
30 fixation.centering();
\r
31 fixation.draw(Color.red);
\r