I've not had any real success using the formulas with [sin] and [cos]... maybe I'm missing something here. The only solution that I've gotten to work is the midpoint circle algorithm with Peter's patch.
I've included a patch to show where I'm struggling... When the arc gets drawn with bigger radiuses (and bigger arrays) there are a lot of indexes with no value so it's constantly jumping between 0 and the correct value. Is there a way to get pd to approximate the values in between (more or less an average between plotted points)?
Thanks so far for all the help Tyler
On Fri, Apr 8, 2011 at 11:12 PM, Mathieu Bouchard matju@artengine.cawrote:
On Fri, 8 Apr 2011, Tyler Leavitt wrote:
I am trying to graph a section of a circle into an array. I have been
trying to wrap my head around [sin] and [cos] but none of my configurations get results. If you had a circle with radius 100 with a center at (0, 0) I'm trying to get the upper right quadrant (positive x and positive y). The start point being (100,0) and the end point being (0,100).
Any ideas on moving forward?
use angles between 0 and pi/2 = 1.5708
putting those into [cos] and [sin] will give you values for a circle of radius 1 at (0,0). For different radiuses you apply [*] after that.
quadrants and clockwiseness depend on which axis uses [cos], which axis uses [sin], and which direction of each axis is positive. There are several standards for those things.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC