I am trying to create a segmented arc using PIL and Imagedraw. The arc function allows me to easily draw an arc, but it's just a line. I need to be able to locate an arc of a given radius and thickness (ID-OD), but AI cannot find any type of thickness or width. Is there any way to do this? If not, is there another way to do this with PIL?
Excerpt:
import Image import ImageDraw conv = 0.1 ID = 15 OD = 20 image = Image.new('1',(int(ceil(OD/conv))+2,int(ceil(OD/conv))+1), 1) draw = ImageDraw.Draw(image) diam = OD-ID box=(1, 1, int(ceil(diam/conv)), int(ceil(diam/conv))) #create bounding box draw.arc(box, 0, 90, 0) #draw circle in black
source share