View Full Version : Need the math script to determine the X/Y Coordinate from...
Mikeylkzt
April 19th, 2002, 04:28 PM
An ARC.
Hello ALL Math Genious!
I need to get information on how to calculate the X/Y Coordinate of a given PIE Chart.
Let's say I have a circle Divided into 4-5 (not necessarily equal in size) Pie Charts. Now How do I calculate for the X/Y Coordinate of the Center ARC of each pie section?
Did this make sense?
basically it's a circle with a crossSection right in the middle and i want the X/Y coordinate of one of the Sections.
Thanks in Advance
Angelo
P.S. KUDOS to the first one with the solutions.
I am not Jubba
April 19th, 2002, 04:32 PM
I'm unclear, can you draw something and post it? i don't really understand. I know someone here (if not me) can figure it out, but I can tell what you want....:) sorry...
Mikeylkzt
April 19th, 2002, 04:42 PM
Im trying to figure out a formula to figure out the X/Y Coordinate of a given point on a circle.
I can figure out the Area of a circle pretty easy....What I want to do now is try and figure out how to track something on a particular Circular Image.
Almost like a regular clock with the Minutes and the Hours indicator, I want to be able to TRACK ANY POINT of that circle. By using the X/Y coordinate within hte AREA of that circle.
I hope this helps.
Thanks
I am not Jubba
April 19th, 2002, 04:50 PM
I don't understand. Maybe someone else will. Sorry. It just doesn't make any sense to me. You are probly explaining it good enough, but I just spend 2 hours trying to fix a flash file for a friend of mine and my brain is fried.
Mikeylkzt
April 19th, 2002, 04:53 PM
Thanks for trying.. i really appreciate it.
As always, This place is THE BEST place to get info on Flash, If it was not for this board, I would not have been able to keep my current job!
Keep up the good work.
BTW- it's been about 2-4 months since my last posts.
suprabeener
April 19th, 2002, 07:57 PM
i'm not sure just what you mean either, but this might get you started ...
remember trig?
make a movie of a largish, unfilled circle with it's registration point at its center.
within that movie, make a movie of a small filled circle, also with it's registration point at its center.
select the small circle movie and put this code on it:
onClipEvent(mouseUp){
var x = _parent._xmouse;
var y = _parent._ymouse;
var r = _parent._width/ ((x<0) ? -2 : 2);
var ang = Math.atan(y/x);
_x = Math.cos(ang)*r;
_y = Math.sin(ang)*r;
}
click away.
Mikeylkzt
April 22nd, 2002, 11:52 AM
Thanks for the Reply!
As always- The best place to get your Flash answers!
Im extremely greatful
Mike
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.