# rotation drawing

**URL:** <https://psychtoolbox.discourse.group/t/rotation-drawing/925>\
**Category:** Uncategorized\
**Created:** [June 23, 2005, 1:35am UTC](https://psychtoolbox.discourse.group/t/rotation-drawing/925 "2005-06-23T01:35:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [June 23, 2005, 1:35am UTC](https://psychtoolbox.discourse.group/t/rotation-drawing/925/1 "2005-06-23T01:35:49Z")

</div>

dear psychtoolbox users,  
  
 i have been using this toolbox to draw my visual stimuli and now I  
have some questions. I am drawing a rotation stimuli. The strategy I  
am now using is  
a) pre-draw each frames in a matrix and save it.  
b) load it to the offscreen window when doing the experiment.  
c) Then present them continuously.  
 As I have a large group of frames, step a) and b) would cost a lot  
of time. The only difference between frames was the phase (rotate a  
little). So is it possible to have only one frame of the picture and  
only change the phase when loading to different offscreen window? Or,  
better, only change the phase while put the offscreen window to the  
'onscreen' one? If both was impossible, is there any other way to  
reduce the time?  
  
btw: matlab6.5@windows  
  
Sorry to post again, because the origin mail was neglected...

---

<div class="post-metadata">

**Author:** ![mariokleiner](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@mariokleiner](https://psychtoolbox.discourse.group/u/mariokleiner)\
**Post date:** [June 27, 2005, 2:10pm UTC](https://psychtoolbox.discourse.group/t/rotation-drawing/925/2 "2005-06-27T14:10:59Z")

</div>

If you would use Psychtoolbox 1.0.6 for MacOS-X, you could use the  
Screen('MakeTexture',...) command, which allows rotated drawing  
of images - use one image, draw it with some different angle in  
each successive frame.  
  
On Windows, this is not supported: If you have the Matlab image  
processing toolbox installed, have  
a look at "help imrotate" on how to rotate your image before  
putting it into an offscreen window.  
  
Otherwise, you're on your own and your current solution is the  
best i know of.  
  
-mario  
  
  

> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), peng \<prion.w@g...\> wrote:  
> \> dear psychtoolbox users,  
> \>   
> \> i have been using this toolbox to draw my visual stimuli and now I  
> \> have some questions. I am drawing a rotation stimuli. The strategy I  
> \> am now using is  
> \> a) pre-draw each frames in a matrix and save it.  
> \> b) load it to the offscreen window when doing the experiment.  
> \> c) Then present them continuously.  
> \> As I have a large group of frames, step a) and b) would cost a lot  
> \> of time. The only difference between frames was the phase (rotate a  
> \> little). So is it possible to have only one frame of the picture and  
> \> only change the phase when loading to different offscreen window?  
> Or,  
> \> better, only change the phase while put the offscreen window to the  
> \> 'onscreen' one? If both was impossible, is there any other way to  
> \> reduce the time?  
> \>   
> \> btw: matlab6.5@windows  
> \>   
> \> Sorry to post again, because the origin mail was neglected...
