is within ... polygon shape?

Steve Bonham sbonham at georgiasouthern.edu
Fri Jun 24 10:30:36 EDT 2005


hmmmm-

Intersect doesn't work after all. It appears that one object will 
intersect with another irregular object's rect and NOT the objects 
true shape (polygon points).
See illustration... at:
	http://academics.georgiasouthern.edu/cet/SB/ball_fairway.jpg

Is there a way to get Rev to:
1. evaluate IF the loc of an object is within the shape (defined by a 
series of coordinates) of an object?

OR
2. evaluate IF the loc of an object intersects with the shape 
(defined by a series of coordinates) of an object?

Thx,
S



>Answered my own question- I found the "intersect" function and it 
>works (see below)
>
>if intersect(graphic "ball", graphic "sand1") then
>         put "in the bunker"  into YourLie
>       end if
>
>HOWEVER...
>
>There are many, many objects that the ball object may intersect with...
>Is it possible to use a "wildcard" character in Rev?
>
>For instance, there are 3 sand bunkers (sand1, sand2, sand3) and 60+ 
>trees (tree1, tree2, etc)
>
>Can I use something along the lines of :
>
>if intersect(graphic "ball", graphic "tree" & *) then
>         put "in the bunker"  into YourLie
>       end if
>
>I'm supposing this is not possible (but it sounds like a logical 
>need)-- but maybe there is another way to accomplish this?
>
>Thx
>S

-- 


--------------------------------------------------------------------------------------------------
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