Circle pixel coordinates

mitsusdev

Member
Licensed User
Longtime User
Hi all,
i've a question about pixel coordinates.

I've draw a circle (Activity is canvas), then how do i find coordinates of pixels (x,y) that are on circumference?

Thanks a lot and Best Regards
 

mitsusdev

Member
Licensed User
Longtime User
x = r * cos(angle)
y = r * sin(angle)

where r = radius (constant)
angle = 0 to 360

iterate through angle to get values of (x,y) at the granularity required

Thank a lot thedesolatesoul....in fact I had not thought about the mathematical formula.

Reagards
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…