Question: # This function paints ONE anime eyeball on the Canvas, centered at . The color of the iris is NewColor, the pupil is black, and
# This function paints ONE anime eyeball on the Canvas, centered at
def Eyeball (Canvas,Xc,Yc,R,NewColor): return
In the Eyeball function (see above), write new code to paint a single anime eyeball on the canvas, given the center of the circle is at location
The radius of the iris (the colored area) comes directly from parameter R. The radius of the pupil (the black center of the eye) is half the radius of the iris, and has the same center coordinates as the iris. The radius of the big highlight (the big white spot) is one-quarter that of the iris. The radius of the smaller highlight is one-seventh that of the iris. The centers of the highlights are located relative to the center of the eyeball at a distance offset in the X and Y directions by an amount calculated as follows: Offset = 1/4 R sq rt
This will put the center of the highlights directly on the boundary between the pupil and the iris, at 45 degree angles relative to the center of the pupil. You will also have to call addStarburst at the appropriate time. The starburst has the same center coordinates as the pupil and the iris. The inner radius is R (the radius of the pupil) plus 1 15 TH of R, and the outer radius is R minus 1 15th of R. There are 40 segments in the starburst.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
