Re: Code for a circle
Re: Code for a circle
- Subject: Re: Code for a circle
- From: Helmut Fuchs <email@hidden>
- Date: Thu, 13 Mar 2003 21:36:15 +0100
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 ?
The formula looks something like this:
x=centerX+radius*sin angle
y=centerY+radius*cos angle
with angle running from 0 to 2*pi
If AppleScript had proper math functions on board, this should be
easy to implement. But it hasn't. I still don't grasp why a scripting
language has to rely on additions to do trigonometric functions (and
even something as basic as rounding a number has to be added by way
of "Standard Additions"). Probably because it wouldn't be
AppleScript, if it was feature complete and devoid of bugs...
HTH,
Helmut
_______________________________________________
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.