Points in a circular area

Alejandro Tejada capellan2000 at yahoo.com
Thu Jan 29 17:44:09 EST 2004


on Thu, 29 Jan 2004
Xavier Bury wrote:

>x1= r * cos(x)
>y1=r * sin(y)?

>r = radius and x y are the coordinates on the axis
>and x1 y1 are the points in the arc...

Do you refer that with this formula,
i could find all the points in a line
or within the area delimited with this line?

This is a interesting idea too!
I'll test this formula.

Thanks a lot Xavier!


Jim Hurley wrote:

> I presume you mean all integer coordinates within
> the arc. And the arc is a slice of pie?

Yes, that is!

> This is crude, but possibly viable.
> 
> A little Turtle Graphics (with radial coordinates)
> might help--of course :-)
> 
> If the arc is a piece of pie: Use polar coordinates.
> Set the origin at the apex of the arc.  

> Test for all x-y integer coordinates within 
> a square of side R (radius of the arc)  for their
> radial coordinates. 

How did i could test the radial coordinate of
every point?

Probably this is a very consuming task for large
sets of coordinates. Or not?

> Accept those for which r is less than R and theta is
> between the arc angles.

R is the radius or the arc.

theta is the angle produced by
the origin or apex of the arc and
the coordinate that i'm testing.

r is the radius (or length) between the 
coordinate and the origin of the arc.

> Is this clear without a figure?

If the above interpretation is correct, yes.
I see it doable, and then
I'll check the time it takes.

Thanks a lot for the idea, Jim!

al

=====
Visit my site:
http://www.geocities.com/capellan2000/
Search the mail list:
http://mindlube.com/cgi-bin/search-use-rev.cgi

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/


More information about the use-livecode mailing list