# FrameArc Bug

**URL:** <https://psychtoolbox.discourse.group/t/framearc-bug/1527>\
**Category:** Uncategorized\
**Created:** [August 3, 2005, 8:11pm UTC](https://psychtoolbox.discourse.group/t/framearc-bug/1527 "2005-08-03T20:11:55Z")\
**Posts on this page:** 1\
**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:** [August 3, 2005, 8:11pm UTC](https://psychtoolbox.discourse.group/t/framearc-bug/1527/1 "2005-08-03T20:11:55Z")

</div>

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
