CS 457/557 -- Winter Quarter 2025

Project #5

Image Manipulation in a "Magic Lens"

100 Points

Due: February 18


This page was last updated: January 3, 2025


Requirements:

  1. In computer graphics (and especially in visualization), there is a technique called a Magic Lens. A Magic Lens is some shape, usually a rectangle or circle, into which a different version of the display is drawn. The Magic Lens can be moved around the scene to show different representations in different regions. Your job is to create a circular Magic Lens for an image display. Inside the Magic Lens, the image needs to be able to be magnified, whirled, and mosaic'ed.

  2. ParameterWhat It DoesDoes it have to be varied?
    uScs center of the MLYes
    uTct center of the MLYes
    uRadRadius of the MLYes
    uMagMagnification FactorYes
    uWhirlWhirl coefficientYes
    uMosaicMosaic'ing coefficientYes

  3. Draw a quadrilateral that has (s,t) coordinates and map an image to it using a 2D Texture. Use an image of your own choosing -- not one of mine!

  4. If you are using glman, your glib file could look something like this:
    ##OpenGL GLIB
    Ortho -5. 5.   -5. 5.
    LookAt 0 0 2  0 0 0  0 1 0
    
    Texture2D 5 image.bmp
    
    Vertex   magnifywhirlmosaic.vert
    Fragment magnifywhirlmosaic.frag
    Program  MagnifyWhirlMosaic				\
    	uSc	<0. .5 1.>				\
    	uTc	<0. .5 1.>				\
    	uRad   	<0.01 ?? ??>				\
    	uMag	<.1 ?? ??>				\
    	uWhirl	<-30. 0. 30.>				\
    	uMosaic <0.001 0.001 0.1>			\
    	uImageUnit  5
    
    QuadXY .1 1.
    

Hints

The Turn-In Process:

Use Canvas to turn in your:

  1. Your source files: .cpp, .glib, .vert, .frag, .geom
  2. A short PDF report containing:

  3. To see how to turn these files in to Canvas, go to our Project Notes noteset, and go the the slide labeled How to Turn In a Project on Canvas.

  4. Be sure that your video's permissions are set to unlisted.. The best place to set this is on the OSU Media Server.

  5. A good way to test your video's permissions is to ask a friend to try to open the same video link that you are giving us.

  6. The video doesn't have to be made with Kaltura. Any similar tool will do.

Original Magnify Whirl Mosaic

Grading:

FeaturePoints
Something different happens inside the circle20
The circle can be resized and moved20
Magnification works20
Whirling works20
Mosaic'ing works20
Potential Total100