How to draw a circle on LCD128x64 and also draw custom chars?

I tried this one, of course it's not working. But this is my effort tonight.

	for(px=x,py=y-r;px<x+r;px++){
		lcd128x64_pixel_set(py,px);
		py = square(px) - square(r);
		py/=2;
	}

You do NOT want to drive x from origin to radius - that WILL alias after the 45 degree mark (going clockwise).

What about the code in reply #15?

(It should be possible to eliminate the square root operation, at the (hopefully lesser) expense of a few simple iterations).

I tried this one, of course it's not working. But this is my effort tonight.

	for(px=x,py=y-r;px<x+r;px++){
	lcd128x64_pixel_set(py,px);
	py = square(px) - square(r);
	py/=2;
}

Of course not. The solution for y involves a square root.