1 #include <psychlops.h>
\r
2 using namespace Psychlops;
\r
5 Psychlops::Color col1;
\r
9 double lmean=0.25, contrast=0.5, theta=0;
\r
11 double orientation=45*PI/180;
\r
13 //
\8cð
\8d·
\82·
\82é
\8eÈ
\82Ì
\8fî
\95ñ
\r
15 double lmean2=0.25, contrast2=0.25, theta2=0;
\r
17 double orientation2=135*PI/180;
\r
19 void psychlops_main() {
\r
21 Canvas sampleA(Canvas::fullscreen);
\r
23 for(int i=0;i<width;i++){
\r
24 for(int j=0;j<height;j++){
\r
26 xx=cos(orientation)*i-sin(orientation)*j;
\r
27 yy=sin(orientation)*i+cos(orientation)*j;
\r
28 xx2=cos(orientation2)*i-sin(orientation2)*j;
\r
29 yy2=sin(orientation2)*i+cos(orientation2)*j;
\r
31 col1.set( lmean*(1+contrast*sin(theta+(2*PI*yy/lambda)))+
\r
32 lmean2*(1+contrast2*sin(theta2+(2*PI*yy2/lambda2)))
\r
34 p1.centering().shift((double)-1/2*width+i,(double)-1/2*height+j);
\r
35 sampleA.pix(p1,col1);
\r
39 while(!Input::get(Keyboard::spc));
\r