Memorandums

知覚・認知心理学の研究と教育をめぐる凡庸な日々の覚書

PsychToolBox  画面制御

2005-06-22 | PsychToolBox
PsychToolBox  画面制御

screen 関数の使い方例

>>help screen
で参照。以下にその一部を転載。
------
MOVIES ARE EASY

% make movie
window=Screen(0,'OpenWindow',0);
rect=[0 0 200 200];
for i=1:100
movie(i)=Screen(window,'OpenOffscreenWindow',0,rect);
Screen(movie(i),'FillOval',255,[0 0 2 2]*(i-1));
end;
% show movie
for i=[1:100 100:-1:1] % forwards and backwards
Screen('CopyWindow',movie(i),window,rect,rect);
Screen(window,'WaitBlanking');
end;
Screen('CloseAll');
------
Screen ARGUMENTS

"windowPtr" argument: Screen 'OpenWindow' and 'OpenOffscreenWindow' both
return a windowPtr, a number that designates the window you just
created. You can create many windows. And you can obtain a windowPtr to
any of Matlab's windows. To use a window, you pass its windowPtr to the
Screen function you want to apply to that window.

"rect" argument: "rect" is a 1x4 matrix containing the upper left and
lower right coordinates of an imaginary box containing all the pixels.
Thus a rect [0 0 1 1] contains just one pixel.
コメント    この記事についてブログを書く
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする
« PsychToolBox 心理実験サンプル | トップ | MATLAB 2 プログラムの作成 »

コメントを投稿

ブログ作成者から承認されるまでコメントは反映されません。

PsychToolBox」カテゴリの最新記事