Screen resolution and image size

Dear All,

I have a question regarding the changing size of my stimuli with
change in the screen resolution.My program displays various shapes on
the screen. Currently the size of the shapes is tied to the resolution
of the screen.. what I mean is that , when I switch to a lower
resolution, the shapes become too big to fit on the screen.
Naturally, I want the size of the shapes to change proportionally when
I change the screen resolution. Is there any way of doing this...any
suggestions/ideas?

Thanks in advance!

RN
I generally keep track of distance to the screen, monitor width and
height, and screen resolution. From then it's trivial to calculate the
angular size of a pixel using the small angle approximation, sin(x) ~
tan(x) ~ x, and tan(angular width of a pixel in radians) ~ angular
width of a pixel in radians = monitor width/(screen resolution *
viewing distance), same goes for angular height. Then keep all sizes
as angle measurements and convert on the go, num horizontal pixels =
desired angular width in radians / angular width of a pixel in
radians. One thing that simplifies coding is to have all measurements
from the center of the screen, for example Screen('DrawDots') can take
an optional argument that specifies the center of the coordinate
system, set it to [resolutionX/2 resolutionY/2]. And of course you can
get the current resolution of the screen from [win rect] =
Screen('OpenWindow'), with resolutionX = rect(3) and resolutionY =
rect(4).

Patrick

On 8/31/07, Remya <remya_nair@...> wrote:
> Dear All,
>
> I have a question regarding the changing size of my stimuli with
> change in the screen resolution.My program displays various shapes on
> the screen. Currently the size of the shapes is tied to the resolution
> of the screen.. what I mean is that , when I switch to a lower
> resolution, the shapes become too big to fit on the screen.
> Naturally, I want the size of the shapes to change proportionally when
> I change the screen resolution. Is there any way of doing this...any
> suggestions/ideas?
>
> Thanks in advance!
>
> RN
>
>
>
>
>
> Post your message to: psychtoolbox@yahoogroups.com
> Please indicate OS9, OSX, or WIN version, and include your full name.
> Denis Pelli, David Brainard, and Allen Ingling.
> http://psychtoolbox.org
>
> Yahoo! Groups Links
>
>
>
>