Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 16 lines (12 sloc) 0.571 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
import argparse
from glassworld import World

parser = argparse.ArgumentParser(description='See what any image will look ' +
    'like through a slab of glass of the given thickness.')
parser.add_argument('--img', '-i',
                   help='the image you want to distort, ie "-i image.jpg"')
parser.add_argument('--th', '-t',
                   help='the thickness of the glass in centimeters, ' +
                   'ie "-t 100"')
args = parser.parse_args()


w = World(args.img, thickness=int(args.th))

w.render_image(args.img[:-4] + "-refracted" + args.img[-4:])
Something went wrong with that request. Please try again.