View Question
 ```Given a 2D oval with origin x,y and x radius of xr and y radius of yr what is the equation to plot the individual points of the permiter?``` Clarification of Question by michaelo1966-ga on 16 Aug 2006 18:33 PDT ```Whoops -- forgot something -- want to know the point also given an angle. So if original is x, y and x radius is xr and y radius is yr and angle is a (0-360) what is the x/y location of the permiter?``` Clarification of Question by michaelo1966-ga on 17 Aug 2006 07:43 PDT ```OK -- I answered my own question but thought I'd post here. Maybe I get my own \$2? Or if I stumble into a time machine I'll be that much more likely to pass geometry. Answer: /* * Oval is object with properties: * x = x center * y = y center * xr = x radius * yr = y radius */ function getOvalPoint(oval:Object, angle:Number, offset:Number):Point { if(offset==undefined){ offset = 0; } var radians:Number = degreesToRadians(angle); var px:Number = oval['x'] + Math.cos(radians) * (oval['rx']+offset); var py:Number = oval['y'] + Math.sin(radians) * (oval['ry']+offset); return new Point(px, py); }```