Any trigonometry wizards out there?
Any trigonometry wizards out there?
- Subject: Any trigonometry wizards out there?
- From: Rob Stott <email@hidden>
- Date: Tue, 8 Jul 2003 14:07:11 +0100
Hi, just wondered if we have any trigonometry experts on the list who'd
be willing to help me?
I have a circle in an Illustrator 10 document (centred on 0, 0) and I
want to cut a slice off the right hand side.
I'm using the script below at the moment which kind of works, but I
need to calculate the co-ordinates for the left and right directions of
the two new points. At this point, my brain seizes up. Incidentally,
theXcoordinate can vary.
Any help would be very much appreciated!
Cheers
r.
set theXcoordinate to 200
tell application "Adobe Illustrator 10"
tell front document
tell path item 1
--set the selected of path point 1 to true
set theWidth to the width
set theRadius to width * 0.5
set theYcoordinate to square root of ((theRadius * theRadius) -
(theXcoordinate * theXcoordinate))
set theNewPoint to make new path point at beginning with properties
{anchor:{theXcoordinate, theYcoordinate}, point type:smooth, left
direction:{theXcoordinate, theYcoordinate}, right
direction:{theXcoordinate, theYcoordinate}}
set theYcoordinate to 0 - theYcoordinate
set theNewPoint to make new path point at beginning with properties
{anchor:{theXcoordinate, theYcoordinate}, point type:smooth, left
direction:{theXcoordinate, theYcoordinate}, right
direction:{theXcoordinate, theYcoordinate}}
delete path point 1
end tell
end tell
end tell
--
Rob Stott
Apple Mac Artist & Developer
_______________________________________________
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.