diff --git a/drawing.py b/drawing.py index fb0a908..e83a5c2 100644 --- a/drawing.py +++ b/drawing.py @@ -84,28 +84,32 @@ hideturtle() faceLength = 200 +# these shifts are based on the short and long chord-lengths of the original face ellipse +halfShift = 2*(faceLength/2)*math.sin(math.pi/4) +fullShift = 2*(faceLength)*math.sin(math.pi/4) + right(20) -goto(2*(faceLength/2)*math.sin(math.pi/4)*0.5,0) +goto(halfShift*0.5,0) ear(-faceLength,'sienna') -goto(-2*(faceLength/2)*math.sin(math.pi/4)*0.5,0) +goto(-halfShift*0.5,0) right(140) ear(faceLength,'sienna') -goto(-2*(faceLength/2)*math.sin(math.pi/4)*0.5,0) +goto(-halfShift*0.5,0) setheading(-135) face(faceLength,'white') -goto(-2*(faceLength/2)*math.sin(math.pi/4),-2*(faceLength)*math.sin(math.pi/4)*1.25) +goto(-halfShift,-fullShift*1.25) setheading(-45) face(faceLength,'sienna') setheading(0) -goto(-2*(faceLength/2)*math.sin(math.pi/4)*0.4,-faceLength/2) +goto(-halfShift*0.4,-faceLength/2) eye(faceLength/12,'black') -goto(2*(faceLength/2)*math.sin(math.pi/4)*0.4,-faceLength/2) +goto(halfShift*0.4,-faceLength/2) eye(faceLength/12,'black') -goto(faceLength/12,-2*(faceLength/2)*math.sin(math.pi/4)*1.25) +goto(faceLength/12,-halfShift*1.25) nose(faceLength/6) done()