
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Mirror Pixels Program: Recipe # def mirrorVertical(source): mirrorpoint = int(getWidth(source)/2) for y in range(1,getHeight(source)): for xOffset in range(1,mirrorpoint): pright = getPixel(source, xOffset+mirrorpoint,y) pleft = getPixel(source, mirrorpoint-xOffset,y) c = getColor(pleft) setColor(pright,c) In this program I have chosen to mirror an image of the Eiffel Tower in Paris, France. In this particular image, I have chosen to mirror the image along its vertical axis. This way the left side will imitate the right side. You can mirror that image at different point throughout the picture but I have chosen to do it directly in the middle to create a symmetrical affect. This was done by dividing the source/2. Original Picture Mirrored Image