Need to draw a polygon that parallels a randomized line

Steve Bonham sbonham at georgiasouthern.edu
Fri Jun 17 10:27:16 EDT 2005


Mikey,

This is a mock-up of what is desired (and design strategies):
http://academics.georgiasouthern.edu/cet/SB/fairway.jpg

The long axis of the polygon will be aligned with the line between 
the green and the tee but the loc of the fairway will need to be 
located more closely to the green. Since polygons cannot have smooth 
points in Rev (correct?) I'm assuming the need to be able to identify 
4 critical points and come up with a formula to identify an arc on 
each extremity (at least 5 additional points on each end I'd guess. 
So that's 14 segments. Ideally the width of the fairway closest to 
the tee with be about 30 pixels wide (same as the tee), and the area 
surrounding the green will be 110 to 130% the width of the green (a 
random number between 30 and 45).

I was originally thinking I'd have Rev draw a rhombus and then 
position a circle atop each end of appropriate size to simplify the 
drawing process. See illustration. I hope this clarifies.

Steve


>Is the poly centered on the line?  How many verticies can there be?
>How many segments?  Is there some limit as to where it can wander?  Is
>there some limit as to what area it can encompass?
>
>When you say it "parallels" the line, do you mean that you only have
>four sides on a rhombus?

-- 


--------------------------------------------------------------------------------------------------
Steve Bonham
Director, Faculty Technology Development Laboratory
Center for Excellence in Teaching - Georgia Southern University
Statesboro, GA 30460-8143
--------------------------------------------------------------------------------------------------


More information about the use-livecode mailing list