I've been trying to use FrameArc to draw curved lines on the screen
by subtending part of a circle. To make the curved lines gradually
more straight, i've been increasing the radius of the circle. it
seems, however, that as the center of the rectangle containing the
circle begins to move off screen, framArc becomes wildly
inaccurate. Even after calculating the necceasry angle to subtend
the same arclength, as the circle increases in radius, FrameArc
starts drawing the segment further and further away from where it
should. Specifically, as the radius increases, the middle of the
subtended portion of the circle seems to head towards 0 degrees.
When i center the arc at 270, for example, it seems to draw it
centered at 260.
I'm guessing the bug starts when the center of the circle-rectangle
goes offscreen.
I'm running Psychtoolbox WIN 2.54 and MATLAB 7 on XP Proffesional
A quick illustration:
[onWindow, onRect] = SCREEN(0,'OpenWindow',0)
%circle with a radius of 10000 pixels, centered, and shifted 10000 %
pixels to the right.
circleRect = CenterRect([0 0 20000 20000],onRect)+[10000 0 10000 0]
SCREEN(onWindow,'FrameArc',255,circleRect,269.1406,1.789)
%269.1406 is 270 minus half the subtended angle (1.789)
-Donny
by subtending part of a circle. To make the curved lines gradually
more straight, i've been increasing the radius of the circle. it
seems, however, that as the center of the rectangle containing the
circle begins to move off screen, framArc becomes wildly
inaccurate. Even after calculating the necceasry angle to subtend
the same arclength, as the circle increases in radius, FrameArc
starts drawing the segment further and further away from where it
should. Specifically, as the radius increases, the middle of the
subtended portion of the circle seems to head towards 0 degrees.
When i center the arc at 270, for example, it seems to draw it
centered at 260.
I'm guessing the bug starts when the center of the circle-rectangle
goes offscreen.
I'm running Psychtoolbox WIN 2.54 and MATLAB 7 on XP Proffesional
A quick illustration:
[onWindow, onRect] = SCREEN(0,'OpenWindow',0)
%circle with a radius of 10000 pixels, centered, and shifted 10000 %
pixels to the right.
circleRect = CenterRect([0 0 20000 20000],onRect)+[10000 0 10000 0]
SCREEN(onWindow,'FrameArc',255,circleRect,269.1406,1.789)
%269.1406 is 270 minus half the subtended angle (1.789)
-Donny