+ c1 = {contrast[0], center_orientation-orientation_offset, lambda[0], tf[0]};\r
+ c2 = {contrast[1], center_orientation+orientation_offset, lambda[1], tf[1]};\r
+\r
+ drawgratingmovie(movie[0],c1, c2, 0.5, 0, refresh_int, bg_lum, 1.0);\r
+ drawgratingmovie(component_movie[0],c0, c2, 0.5, 0, refresh_int, bg_lum, 1.0);\r
+ drawgratingmovie(component_movie[1],c1, c0, 0.5, 0, refresh_int, bg_lum, 1.0);\r
+ ///- type-I\r
+\r
+ ///+ type-II\r
+ // Prepare Type-II plaid movie\r
+ center_orientation = -0.0, orientation_offset = Math.PI/12;\r
+ contrast[0] = 1.0, contrast[1] = 1.0;\r
+ lambda[0] = 30.0, lambda[1] = 30.0;\r
+ tf[0] = 1.0; tf[1] = 4.0;\r
+\r
+ c1 = {contrast[0], center_orientation-orientation_offset, lambda[0], tf[0]};\r
+ c2 = {contrast[1], center_orientation+orientation_offset, lambda[1], tf[1]};\r
+\r
+ drawgratingmovie(movie[1],c1, c2, 0.5, 0, refresh_int, bg_lum, 1.0);\r
+ drawgratingmovie(component_movie[2],c0, c2, 0.5, 0, refresh_int, bg_lum, 1.0);\r
+ drawgratingmovie(component_movie[3],c1, c0, 0.5, 0, refresh_int, bg_lum, 1.0);\r
+ ///- type-II\r
+\r
+ ///+ gaussian\r
+ //draw Gaussian envelopes\r
+ envelope.clear(new Color(bg_lum)); //clear offscreen image\r
+ double _x, _y;\r
+ for(int i=0; i<rect_size; i++){\r
+ _x=i-0.5*rect_size;\r
+ for(int j=0; j<rect_size; j++){\r
+ _y=j-0.5*rect_size;\r
+ envelope.alpha(i,j,1.0-Math.exp(-((_x*_x+_y*_y)/ (2.0*pow(rect_size/6.0, 2.0) ))));\r
+ }\r