- public void each_frames()\r
- {\r
- cnvs.clear(new Color(Mouse.left.pressed() ? 1.0 : 0.5));\r
- img.field(\r
- (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
- );\r
- img.centering(Mouse.position);\r
- //img.shift(1,0);\r
- img.draw();\r
- fixation.centering();\r
- fixation.draw(Color.red);\r
- cnvs.flip();\r
+\r
+ while(true) {\r
+ frames++;\r
+ \r
+ cnvs.clear(new Color(Mouse.left.pressed() ? 0.75 : 0.5));\r
+ col.set(Math.random(1.0));\r
+\r
+ fixation.centering();\r
+ fixation.draw(Color.red);\r
+\r
+ //Figures.drawGabor(ref img, 20, 100, 1, 0, frames * 2.0 * Math.PI / tfreq / 60);\r
+ //Figures.drawGaussian(ref img, 20, 1);\r
+ Figures.drawGrating(ref img, 100, 100, 20, 1, 2, frames * 2.0 * Math.PI / tfreq / 60);\r
+ img.centering(Mouse.position);\r
+ img.draw();\r
+\r
+ shape.centering(Mouse.position).shift(100,0);\r
+ shape.draw();\r
+ if (Keyboard.spc.pressed()) cnvs.var(Mouse.x, 100, 100);\r
+\r
+ cnvs.var(frames, 10, 20);\r
+\r
+ fixation.shift(100,100);\r
+ fixation.draw(new Stroke(Color.blue, 3));\r
+ AppState.statusBar = "dhdyr";\r
+\r
+ cnvs.flip();\r
+ }\r