Start with a unit square. Add margins of (sqrt(2)-1)/2 = 0.207 to all sides, forming a larger square. Crop off curved pieces from the corners to form a circle. The entire original unit square remains intact.
Inspired by Facebook cropping profile images into discs.
A little tricker: start with a rectangle.
Even trickier: start with a general shape. First find its circumcircle (I don't know of a general algorithm for this offhand), then put that circle in a square.
No comments :
Post a Comment