Mirrors

Post your nifty GP projects here!

Moderator: MSandro

Post Reply
mguzdial
Posts: 70
Joined: Sep 15th, '15, 11:21

Mirrors

Post by mguzdial » Nov 14th, '15, 19:06

I created a new extension that, given a pixel, returns the X and Y positions of the pixel. This allows you to walk through each pixel, ask it its x and y, then do something based on that. One of the most fun things to do with it is mirroring.
mirrorleft2right.png
Turns:
unmirrored.png
unmirrored.png (42.78 KiB) Viewed 6126 times
into:
mirrored.png
mirrored.png (41.38 KiB) Viewed 6126 times
The attached "mirrors.gpp" project includes as specialized blocks copying top to bottom, mirroring top to bottom, and copying left to right.

Given these patterns, it's an interesting exercise to figure out mirroring bottom to top and mirroring right to left.

All of these divide by 2 to get the mirrorpoint. Have students divide by 3 or 4. What's that doing?
Attachments
mirrors.gpp
(1006.19 KiB) Downloaded 343 times
pixelsxy.gp
(1.01 KiB) Downloaded 391 times

JohnM
Posts: 379
Joined: Sep 11th, '15, 14:42

Re: Mirrors

Post by JohnM » Nov 14th, '15, 19:23

Very nice!

Post Reply