
Original State with Light on

Start Drawing the sanitizer

Half of the sanitizer completed and continued drawing the second half

Complete drawing the sanitizer and press “Space” key again to start pump animation
Some screenshots of code
Description: The Magic Pencil was my attempt to bring into reality a traditional Chinese folklore – Ma Liang and His Magic Brush, in which painter Ma Liang draws everything necessary for poor people and turned them into realities with his magic brush. In this project, most objects were drawn with Bezier patches. Specifically, there is a lamp, a pencil and a sanitizer bottle on the table.
Users could use arrow keys to change the viewing direction. “+” and “-” key could zoom in and out. When first time pressing “SPACE” key can start drawing(Animation). After the pencil down, press “SPACE” key again can start the pump animation on sanitizer. Press “4” key could control the light on and off.
Techniques Employed:Opengl and Visual StudioC++