Re: Code for a circle
Re: Code for a circle
- Subject: Re: Code for a circle
- From: Doug McNutt <email@hidden>
- Date: Thu, 13 Mar 2003 12:49:22 -0700
At 13:49 -0500 3/13/03, Paul Skinner wrote:
>
Can anyone explain the formula I should use to generate values for the position of a window such that the values all fall close to lying on a 30 pixel diameter circle ?
I'm not even going to try providing AppleScript syntax but. . .
set radius to 15 pixels
set centerx and centery to whatever you like
loop from phi = 0 to 2*Pi in, say. Pi/6 sized steps which is the same as looping from 0 to 360 degrees in 30 degree steps.
Then take x = centerx + radius * cos(phi) and y = centery + radius * sin(phi)
--
--> As a citizen of the USA if you see a federal outlay expressed in $billion then multiply it by 4 to get your share in dollars. <--
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.