CG Mini Project Report Format
CG Mini Project Report Format
“Yoyo animation”
SUBMITTED BY
1
CERTIFICATE
Submitted by
Shivam Nalawade SE Div 2 Roll No: S5491
is a bonafide work carried out by him under the supervision of Prof. P.S.Sajjashetti and it is
approved for the partial fulfillment of the requirement of University of Pune as a part of Laboratory
Practice III work syllabus (second year Computer Engineering).
Head, Department of
Subject In-charge
Computer Engineering
2
ACKNOWLEDGEMENT
It is indeed a great pleasure and moment of immense satisfaction for we to present a mini
project report on “YoYo animation" amongst a wide panorama that provided us inspiring guidance
and encouragement, we take the opportunity to thanks those who gave us the indebted assistance.
We wish to extend our cordial gratitude with profound thanks to our internal guide
Prof.P.S.Sajjashetti for her everlasting guidance. It was his inspiration and encouragement which
helped us in completing our project.
Our sincere thanks and deep gratitude to Head of Department, Dr.S.P.Bendale and other faculty
member; but also to all those individuals involved both directly and indirectly for their help in all
aspect of the project.
Name: Shivam
Nalawade
3
Title: Yoyo animation using opengl
Aim: Design and implement a 3D YoYo model using OpenGL primitives (e.g., spheres,
cylinders).
Theory:
This OpenGL project simulates a 3D YoYo animation, showcasing smooth motion and
rotation. The YoYo moves up and down along a virtual string, switching directions at
the top and bottom points. User input is not required. The animation runs continuously,
demonstrating realistic physics-based movement. This project utilizes GLUT and
OpenGL libraries for rendering and animation. The outcome is a visually appealing and
interactive 3D graphics simulation
Functions Used:
1. glutInit()
Initializes the GLUT library.
Sets up the OpenGL rendering context.
2. glutInitDisplayMode()
Specifies the display mode for the window.
Options include RGB, single buffer, and double buffer.
3. glutInitWindowSize()
Sets the initial width and height of the window.
Defines the viewport size for rendering.
4. glutCreateWindow()
Creates a window with a specified title.
Displays the animated YoYo.
4
5. glutDisplayFunc()
Registers a callback function for display updates.
Calls the display function repeatedly.
6. glutTimerFunc()
Schedules a callback function at a specified interval.
Updates the YoYo animation periodically.
7. glClear()
Clears buffers to prepare for rendering.
Sets the background color and clears depth buffer.
Approach:
To animate the YoYo, we use a timer to update its position and rotation at regular
intervals. We then render the updated scene using OpenGL's rendering pipeline.
Finally, we continuously display and update the animation to achieve smooth
motion.
This process is repeated continuously to create the illusion of the YoYo moving
up and down along a virtual string.
Source Code:
#include<iostream>
#include<GL/glut.h>
#include<cmath>
5
float qr;
int height = 100; //height of yoyo string
Conclusion:
Thus we have successfully implemented yoyo animation mini project by using various
Open gl fucntions