SlideShare a Scribd company logo
1 of 6
Download to read offline
animation.
#include
#include
#include
#include
#include
#include
#include
animation.
#include
#include
#include
#include
#include
#include
#include
bool rotate1=false, rotate2=false;
double t; double dt=0.1;
double angle1=0; double dangle1 =20;
double angle2=0; double dangle2 =20;
double R=5;//radius spiral
double T=20;//time interval
double shiftx,shifty,shiftz;
bool origin=true;
void output_Text(float x, float y, char *text)
{ int len, i;
glColor3f(1, 0, 0); //red text
glRasterPos3f(x, y, 0);
len = (int)strlen(text);
for (i = 0; i < len; i++) { glutBitmapCharacter(GLUT_BITMAP_8_BY_13, text[i]); }
}
void Time_Delay(int dur) {
clock_t start_time;
start_time = clock();
while ((clock() - start_time) < dur) {
}
}
float ax[3]={25,0,0}; float ay[3]={0,25,0}; float az[3]={0,0,25};//axes void plot_Arrow(float
v1[3], float v2[3]) //plot arrow
{
glBegin(GL_LINES);
glVertex3fv(v1);
glVertex3fv(v2);
glEnd();
}
void plot_Vector(float v[3]) //plot vector
{
float zero[3]={0,0,0};
plot_Arrow(zero,v);
}
void plot_Axis()
{
glColor3f(0,0,0);
plot_Vector(ax);
plot_Vector(ay);
plot_Vector(az);
}
void Draw_Trajectory() {
//your code
}
void myInit3d(void)
{
glClearColor(1,1,1,0);
glColor3f(1.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); // clear the screen
glMatrixMode(GL_PROJECTION);
glLoadIdentity(); // reset the Current Modelview Matrix
bool rotate1=false, rotate2=false;
double t; double dt=0.1;
double angle1=0; double dangle1 =20;
double angle2=0; double dangle2 =20;
double R=5;//radius spiral
double T=20;//time interval
double shiftx,shifty,shiftz;
bool origin=true;
void output_Text(float x, float y, char *text)
{ int len, i;
glColor3f(1, 0, 0); //red text
glRasterPos3f(x, y, 0);
len = (int)strlen(text);
for (i = 0; i < len; i++) { glutBitmapCharacter(GLUT_BITMAP_8_BY_13, text[i]); }
}
void Time_Delay(int dur) {
clock_t start_time;
start_time = clock();
while ((clock() - start_time) < dur) {
}
}
float ax[3]={25,0,0}; float ay[3]={0,25,0}; float az[3]={0,0,25};//axes void plot_Arrow(float
v1[3], float v2[3]) //plot arrow
{
glBegin(GL_LINES);
glVertex3fv(v1);
glVertex3fv(v2);
glEnd();
}
void plot_Vector(float v[3]) //plot vector
{
float zero[3]={0,0,0};
plot_Arrow(zero,v);
}
void plot_Axis()
{
glColor3f(0,0,0);
plot_Vector(ax);
plot_Vector(ay);
plot_Vector(az);
}
void Draw_Trajectory() {
//your code
}
void myInit3d(void)
{
glClearColor(1,1,1,0);
glColor3f(1.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); // clear the screen
glMatrixMode(GL_PROJECTION);
glLoadIdentity(); // reset the Current Modelview Matrix
//the coordinate system, the window and glLookAt in your assigment //can be different
glMatrixMode(GL_MODELVIEW); // position and aim the camera glLoadIdentity();
gluPerspective(45, 1.33, .01, 1000);
gluLookAt(30.0, 30.0, 30.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); }
void myDisplay(void) {
//your code
}
void Do_Nothing(void)
{}
void myMouse(int button, int state, int x, int y) //press left/right button
{ switch (button) {
case GLUT_LEFT_BUTTON:
if (state == GLUT_DOWN)
if (rotate1) rotate1=false; else rotate1=true; break;
case GLUT_RIGHT_BUTTON:
if (state == GLUT_DOWN)
{if (rotate2) rotate2 =false; else rotate2=true;} break;
default:break; }
}
main(int argc, char **argv)
{
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB); glutInitWindowSize (500, 500);
glutInitWindowPosition (100, 100); glutCreateWindow ("Problem 7");
myInit3d();
glutDisplayFunc(myDisplay); glutIdleFunc(myDisplay); glutMouseFunc(myMouse);
glutMainLoop();
}
//the coordinate system, the window and glLookAt in your assigment //can be different
glMatrixMode(GL_MODELVIEW); // position and aim the camera glLoadIdentity();
gluPerspective(45, 1.33, .01, 1000);
gluLookAt(30.0, 30.0, 30.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); }
void myDisplay(void) {
//your code
}
void Do_Nothing(void)
{}
void myMouse(int button, int state, int x, int y) //press left/right button
{ switch (button) {
case GLUT_LEFT_BUTTON:
if (state == GLUT_DOWN)
if (rotate1) rotate1=false; else rotate1=true; break;
case GLUT_RIGHT_BUTTON:
if (state == GLUT_DOWN)
{if (rotate2) rotate2 =false; else rotate2=true;} break;
default:break; }
}
main(int argc, char **argv)
{
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB); glutInitWindowSize (500, 500);
glutInitWindowPosition (100, 100); glutCreateWindow ("Problem 7");
myInit3d();
glutDisplayFunc(myDisplay); glutIdleFunc(myDisplay); glutMouseFunc(myMouse);
glutMainLoop();
}
Problem 6(T2)

More Related Content

Similar to animation.#include windows.h#include GLglut.h#inclu.pdf

The Ring programming language version 1.6 book - Part 57 of 189
The Ring programming language version 1.6 book - Part 57 of 189The Ring programming language version 1.6 book - Part 57 of 189
The Ring programming language version 1.6 book - Part 57 of 189Mahmoud Samir Fayed
 
#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx
#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx
#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docxajoy21
 
Rotate an object in open gl(glut) sample example with source
Rotate an object in open gl(glut) sample example with sourceRotate an object in open gl(glut) sample example with source
Rotate an object in open gl(glut) sample example with sourcekunalashutosh92
 
Computer Graphics and Multimedia lab report
Computer Graphics and Multimedia lab reportComputer Graphics and Multimedia lab report
Computer Graphics and Multimedia lab reportBijoy679
 
The Ring programming language version 1.7 book - Part 59 of 196
The Ring programming language version 1.7 book - Part 59 of 196The Ring programming language version 1.7 book - Part 59 of 196
The Ring programming language version 1.7 book - Part 59 of 196Mahmoud Samir Fayed
 
FLTK Summer Course - Part VIII - Eighth Impact - Exercises
FLTK Summer Course - Part VIII - Eighth Impact - ExercisesFLTK Summer Course - Part VIII - Eighth Impact - Exercises
FLTK Summer Course - Part VIII - Eighth Impact - ExercisesMichel Alves
 
The Ring programming language version 1.5.3 book - Part 65 of 184
The Ring programming language version 1.5.3 book - Part 65 of 184The Ring programming language version 1.5.3 book - Part 65 of 184
The Ring programming language version 1.5.3 book - Part 65 of 184Mahmoud Samir Fayed
 
The Ring programming language version 1.9 book - Part 65 of 210
The Ring programming language version 1.9 book - Part 65 of 210The Ring programming language version 1.9 book - Part 65 of 210
The Ring programming language version 1.9 book - Part 65 of 210Mahmoud Samir Fayed
 
3D dualcopter
3D dualcopter 3D dualcopter
3D dualcopter prakasha g
 
Robot Motion Source code
Robot Motion Source codeRobot Motion Source code
Robot Motion Source codeBrian Goggins
 
Intro to Computer Graphics.ppt
Intro to Computer Graphics.pptIntro to Computer Graphics.ppt
Intro to Computer Graphics.pptadil104135
 
square.cpp Open
 square.cpp Open square.cpp Open
square.cpp OpenMikeEly930
 
The Ring programming language version 1.6 book - Part 59 of 189
The Ring programming language version 1.6 book - Part 59 of 189The Ring programming language version 1.6 book - Part 59 of 189
The Ring programming language version 1.6 book - Part 59 of 189Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 66 of 212
The Ring programming language version 1.10 book - Part 66 of 212The Ring programming language version 1.10 book - Part 66 of 212
The Ring programming language version 1.10 book - Part 66 of 212Mahmoud Samir Fayed
 
Learning WebGLで学ぶWebGL入門
Learning WebGLで学ぶWebGL入門Learning WebGLで学ぶWebGL入門
Learning WebGLで学ぶWebGL入門nakamura001
 
Ass day2 2_rotating my name (robi)
Ass day2 2_rotating my name (robi)Ass day2 2_rotating my name (robi)
Ass day2 2_rotating my name (robi)Robi Parvez
 
The Ring programming language version 1.7 book - Part 60 of 196
The Ring programming language version 1.7 book - Part 60 of 196The Ring programming language version 1.7 book - Part 60 of 196
The Ring programming language version 1.7 book - Part 60 of 196Mahmoud Samir Fayed
 
551 pd fsam_fayed_ring_doc_1.5.2
551 pd fsam_fayed_ring_doc_1.5.2551 pd fsam_fayed_ring_doc_1.5.2
551 pd fsam_fayed_ring_doc_1.5.2Mahmoud Samir Fayed
 
The fallowing program shows the simple transformation #define GLEW.pdf
The fallowing program shows the simple transformation #define GLEW.pdfThe fallowing program shows the simple transformation #define GLEW.pdf
The fallowing program shows the simple transformation #define GLEW.pdfarwholesalelors
 

Similar to animation.#include windows.h#include GLglut.h#inclu.pdf (20)

The Ring programming language version 1.6 book - Part 57 of 189
The Ring programming language version 1.6 book - Part 57 of 189The Ring programming language version 1.6 book - Part 57 of 189
The Ring programming language version 1.6 book - Part 57 of 189
 
#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx
#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx
#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx
 
Rotate an object in open gl(glut) sample example with source
Rotate an object in open gl(glut) sample example with sourceRotate an object in open gl(glut) sample example with source
Rotate an object in open gl(glut) sample example with source
 
Computer Graphics and Multimedia lab report
Computer Graphics and Multimedia lab reportComputer Graphics and Multimedia lab report
Computer Graphics and Multimedia lab report
 
The Ring programming language version 1.7 book - Part 59 of 196
The Ring programming language version 1.7 book - Part 59 of 196The Ring programming language version 1.7 book - Part 59 of 196
The Ring programming language version 1.7 book - Part 59 of 196
 
FLTK Summer Course - Part VIII - Eighth Impact - Exercises
FLTK Summer Course - Part VIII - Eighth Impact - ExercisesFLTK Summer Course - Part VIII - Eighth Impact - Exercises
FLTK Summer Course - Part VIII - Eighth Impact - Exercises
 
The Ring programming language version 1.5.3 book - Part 65 of 184
The Ring programming language version 1.5.3 book - Part 65 of 184The Ring programming language version 1.5.3 book - Part 65 of 184
The Ring programming language version 1.5.3 book - Part 65 of 184
 
The Ring programming language version 1.9 book - Part 65 of 210
The Ring programming language version 1.9 book - Part 65 of 210The Ring programming language version 1.9 book - Part 65 of 210
The Ring programming language version 1.9 book - Part 65 of 210
 
3D dualcopter
3D dualcopter 3D dualcopter
3D dualcopter
 
Robot Motion Source code
Robot Motion Source codeRobot Motion Source code
Robot Motion Source code
 
opengl.ppt
opengl.pptopengl.ppt
opengl.ppt
 
Intro to Computer Graphics.ppt
Intro to Computer Graphics.pptIntro to Computer Graphics.ppt
Intro to Computer Graphics.ppt
 
square.cpp Open
 square.cpp Open square.cpp Open
square.cpp Open
 
The Ring programming language version 1.6 book - Part 59 of 189
The Ring programming language version 1.6 book - Part 59 of 189The Ring programming language version 1.6 book - Part 59 of 189
The Ring programming language version 1.6 book - Part 59 of 189
 
The Ring programming language version 1.10 book - Part 66 of 212
The Ring programming language version 1.10 book - Part 66 of 212The Ring programming language version 1.10 book - Part 66 of 212
The Ring programming language version 1.10 book - Part 66 of 212
 
Learning WebGLで学ぶWebGL入門
Learning WebGLで学ぶWebGL入門Learning WebGLで学ぶWebGL入門
Learning WebGLで学ぶWebGL入門
 
Ass day2 2_rotating my name (robi)
Ass day2 2_rotating my name (robi)Ass day2 2_rotating my name (robi)
Ass day2 2_rotating my name (robi)
 
The Ring programming language version 1.7 book - Part 60 of 196
The Ring programming language version 1.7 book - Part 60 of 196The Ring programming language version 1.7 book - Part 60 of 196
The Ring programming language version 1.7 book - Part 60 of 196
 
551 pd fsam_fayed_ring_doc_1.5.2
551 pd fsam_fayed_ring_doc_1.5.2551 pd fsam_fayed_ring_doc_1.5.2
551 pd fsam_fayed_ring_doc_1.5.2
 
The fallowing program shows the simple transformation #define GLEW.pdf
The fallowing program shows the simple transformation #define GLEW.pdfThe fallowing program shows the simple transformation #define GLEW.pdf
The fallowing program shows the simple transformation #define GLEW.pdf
 

More from ambritgames

Answer all questions 8-10Question 8Why make the selection of I.pdf
Answer all questions 8-10Question 8Why make the selection of I.pdfAnswer all questions 8-10Question 8Why make the selection of I.pdf
Answer all questions 8-10Question 8Why make the selection of I.pdfambritgames
 
answer all subquestions Consider the following version of Mundell.pdf
answer all subquestions  Consider the following version of Mundell.pdfanswer all subquestions  Consider the following version of Mundell.pdf
answer all subquestions Consider the following version of Mundell.pdfambritgames
 
Answer all questions 1-3Question 1 Which of the following is not.pdf
Answer all questions 1-3Question 1 Which of the following is not.pdfAnswer all questions 1-3Question 1 Which of the following is not.pdf
Answer all questions 1-3Question 1 Which of the following is not.pdfambritgames
 
Answer ALL questions Credit will be given for clarity of expression .pdf
Answer ALL questions Credit will be given for clarity of expression .pdfAnswer ALL questions Credit will be given for clarity of expression .pdf
Answer ALL questions Credit will be given for clarity of expression .pdfambritgames
 
answer 1. Why did the plague move with such speed especially with .pdf
answer 1. Why did the plague move with such speed especially with .pdfanswer 1. Why did the plague move with such speed especially with .pdf
answer 1. Why did the plague move with such speed especially with .pdfambritgames
 
Anson Dorrance, el entrenador del equipo de f�tbol femenino de la UN.pdf
Anson Dorrance, el entrenador del equipo de f�tbol femenino de la UN.pdfAnson Dorrance, el entrenador del equipo de f�tbol femenino de la UN.pdf
Anson Dorrance, el entrenador del equipo de f�tbol femenino de la UN.pdfambritgames
 
Ans - 0.148 3.17. Probability of 2 children to be twins is given a.pdf
Ans - 0.148 3.17. Probability of 2 children to be twins is given a.pdfAns - 0.148 3.17. Probability of 2 children to be twins is given a.pdf
Ans - 0.148 3.17. Probability of 2 children to be twins is given a.pdfambritgames
 
Another assumption to explore relates to the duration of revenues fr.pdf
Another assumption to explore relates to the duration of revenues fr.pdfAnother assumption to explore relates to the duration of revenues fr.pdf
Another assumption to explore relates to the duration of revenues fr.pdfambritgames
 
anet, Julie and Bettie have a partnership that makes birthday partie.pdf
anet, Julie and Bettie have a partnership that makes birthday partie.pdfanet, Julie and Bettie have a partnership that makes birthday partie.pdf
anet, Julie and Bettie have a partnership that makes birthday partie.pdfambritgames
 
Annika se estaba divirtiendo jugando al p�quer. Necesitaba que las s.pdf
Annika se estaba divirtiendo jugando al p�quer. Necesitaba que las s.pdfAnnika se estaba divirtiendo jugando al p�quer. Necesitaba que las s.pdf
Annika se estaba divirtiendo jugando al p�quer. Necesitaba que las s.pdfambritgames
 
Anne and Philippe first got to know each other in the Paris area in .pdf
Anne and Philippe first got to know each other in the Paris area in .pdfAnne and Philippe first got to know each other in the Paris area in .pdf
Anne and Philippe first got to know each other in the Paris area in .pdfambritgames
 
Analice Argument Clinic, un boceto de Monty Pythons Flying Circu.pdf
Analice Argument Clinic, un boceto de Monty Pythons Flying Circu.pdfAnalice Argument Clinic, un boceto de Monty Pythons Flying Circu.pdf
Analice Argument Clinic, un boceto de Monty Pythons Flying Circu.pdfambritgames
 
Although Wilma is clearly benefitting from day care, so are Lorenzo .pdf
Although Wilma is clearly benefitting from day care, so are Lorenzo .pdfAlthough Wilma is clearly benefitting from day care, so are Lorenzo .pdf
Although Wilma is clearly benefitting from day care, so are Lorenzo .pdfambritgames
 
Although their populations have increased, mountain Gorillas (Gorill.pdf
Although their populations have increased, mountain Gorillas (Gorill.pdfAlthough their populations have increased, mountain Gorillas (Gorill.pdf
Although their populations have increased, mountain Gorillas (Gorill.pdfambritgames
 
Am�rica Central est� plagada de todos los siguientes hoy en d�a, exc.pdf
Am�rica Central est� plagada de todos los siguientes hoy en d�a, exc.pdfAm�rica Central est� plagada de todos los siguientes hoy en d�a, exc.pdf
Am�rica Central est� plagada de todos los siguientes hoy en d�a, exc.pdfambritgames
 
Amazon Goes Global 2020 Case Study1. Who are the stakeholders in t.pdf
Amazon Goes Global 2020 Case Study1. Who are the stakeholders in t.pdfAmazon Goes Global 2020 Case Study1. Who are the stakeholders in t.pdf
Amazon Goes Global 2020 Case Study1. Who are the stakeholders in t.pdfambritgames
 
Also submit a text-file, in which you explain in about one page what.pdf
Also submit a text-file, in which you explain in about one page what.pdfAlso submit a text-file, in which you explain in about one page what.pdf
Also submit a text-file, in which you explain in about one page what.pdfambritgames
 
Alrededor del 12 de todas las personas escriben con la mano izquier.pdf
Alrededor del 12 de todas las personas escriben con la mano izquier.pdfAlrededor del 12 de todas las personas escriben con la mano izquier.pdf
Alrededor del 12 de todas las personas escriben con la mano izquier.pdfambritgames
 
Alquiler de equipos en BuildIT BuildIT es una empresa constructora.pdf
Alquiler de equipos en BuildIT BuildIT es una empresa constructora.pdfAlquiler de equipos en BuildIT BuildIT es una empresa constructora.pdf
Alquiler de equipos en BuildIT BuildIT es una empresa constructora.pdfambritgames
 
Anders, Inc., tiene 15,000 acciones del 4, valor nominal de $100, a.pdf
Anders, Inc., tiene 15,000 acciones del 4, valor nominal de $100, a.pdfAnders, Inc., tiene 15,000 acciones del 4, valor nominal de $100, a.pdf
Anders, Inc., tiene 15,000 acciones del 4, valor nominal de $100, a.pdfambritgames
 

More from ambritgames (20)

Answer all questions 8-10Question 8Why make the selection of I.pdf
Answer all questions 8-10Question 8Why make the selection of I.pdfAnswer all questions 8-10Question 8Why make the selection of I.pdf
Answer all questions 8-10Question 8Why make the selection of I.pdf
 
answer all subquestions Consider the following version of Mundell.pdf
answer all subquestions  Consider the following version of Mundell.pdfanswer all subquestions  Consider the following version of Mundell.pdf
answer all subquestions Consider the following version of Mundell.pdf
 
Answer all questions 1-3Question 1 Which of the following is not.pdf
Answer all questions 1-3Question 1 Which of the following is not.pdfAnswer all questions 1-3Question 1 Which of the following is not.pdf
Answer all questions 1-3Question 1 Which of the following is not.pdf
 
Answer ALL questions Credit will be given for clarity of expression .pdf
Answer ALL questions Credit will be given for clarity of expression .pdfAnswer ALL questions Credit will be given for clarity of expression .pdf
Answer ALL questions Credit will be given for clarity of expression .pdf
 
answer 1. Why did the plague move with such speed especially with .pdf
answer 1. Why did the plague move with such speed especially with .pdfanswer 1. Why did the plague move with such speed especially with .pdf
answer 1. Why did the plague move with such speed especially with .pdf
 
Anson Dorrance, el entrenador del equipo de f�tbol femenino de la UN.pdf
Anson Dorrance, el entrenador del equipo de f�tbol femenino de la UN.pdfAnson Dorrance, el entrenador del equipo de f�tbol femenino de la UN.pdf
Anson Dorrance, el entrenador del equipo de f�tbol femenino de la UN.pdf
 
Ans - 0.148 3.17. Probability of 2 children to be twins is given a.pdf
Ans - 0.148 3.17. Probability of 2 children to be twins is given a.pdfAns - 0.148 3.17. Probability of 2 children to be twins is given a.pdf
Ans - 0.148 3.17. Probability of 2 children to be twins is given a.pdf
 
Another assumption to explore relates to the duration of revenues fr.pdf
Another assumption to explore relates to the duration of revenues fr.pdfAnother assumption to explore relates to the duration of revenues fr.pdf
Another assumption to explore relates to the duration of revenues fr.pdf
 
anet, Julie and Bettie have a partnership that makes birthday partie.pdf
anet, Julie and Bettie have a partnership that makes birthday partie.pdfanet, Julie and Bettie have a partnership that makes birthday partie.pdf
anet, Julie and Bettie have a partnership that makes birthday partie.pdf
 
Annika se estaba divirtiendo jugando al p�quer. Necesitaba que las s.pdf
Annika se estaba divirtiendo jugando al p�quer. Necesitaba que las s.pdfAnnika se estaba divirtiendo jugando al p�quer. Necesitaba que las s.pdf
Annika se estaba divirtiendo jugando al p�quer. Necesitaba que las s.pdf
 
Anne and Philippe first got to know each other in the Paris area in .pdf
Anne and Philippe first got to know each other in the Paris area in .pdfAnne and Philippe first got to know each other in the Paris area in .pdf
Anne and Philippe first got to know each other in the Paris area in .pdf
 
Analice Argument Clinic, un boceto de Monty Pythons Flying Circu.pdf
Analice Argument Clinic, un boceto de Monty Pythons Flying Circu.pdfAnalice Argument Clinic, un boceto de Monty Pythons Flying Circu.pdf
Analice Argument Clinic, un boceto de Monty Pythons Flying Circu.pdf
 
Although Wilma is clearly benefitting from day care, so are Lorenzo .pdf
Although Wilma is clearly benefitting from day care, so are Lorenzo .pdfAlthough Wilma is clearly benefitting from day care, so are Lorenzo .pdf
Although Wilma is clearly benefitting from day care, so are Lorenzo .pdf
 
Although their populations have increased, mountain Gorillas (Gorill.pdf
Although their populations have increased, mountain Gorillas (Gorill.pdfAlthough their populations have increased, mountain Gorillas (Gorill.pdf
Although their populations have increased, mountain Gorillas (Gorill.pdf
 
Am�rica Central est� plagada de todos los siguientes hoy en d�a, exc.pdf
Am�rica Central est� plagada de todos los siguientes hoy en d�a, exc.pdfAm�rica Central est� plagada de todos los siguientes hoy en d�a, exc.pdf
Am�rica Central est� plagada de todos los siguientes hoy en d�a, exc.pdf
 
Amazon Goes Global 2020 Case Study1. Who are the stakeholders in t.pdf
Amazon Goes Global 2020 Case Study1. Who are the stakeholders in t.pdfAmazon Goes Global 2020 Case Study1. Who are the stakeholders in t.pdf
Amazon Goes Global 2020 Case Study1. Who are the stakeholders in t.pdf
 
Also submit a text-file, in which you explain in about one page what.pdf
Also submit a text-file, in which you explain in about one page what.pdfAlso submit a text-file, in which you explain in about one page what.pdf
Also submit a text-file, in which you explain in about one page what.pdf
 
Alrededor del 12 de todas las personas escriben con la mano izquier.pdf
Alrededor del 12 de todas las personas escriben con la mano izquier.pdfAlrededor del 12 de todas las personas escriben con la mano izquier.pdf
Alrededor del 12 de todas las personas escriben con la mano izquier.pdf
 
Alquiler de equipos en BuildIT BuildIT es una empresa constructora.pdf
Alquiler de equipos en BuildIT BuildIT es una empresa constructora.pdfAlquiler de equipos en BuildIT BuildIT es una empresa constructora.pdf
Alquiler de equipos en BuildIT BuildIT es una empresa constructora.pdf
 
Anders, Inc., tiene 15,000 acciones del 4, valor nominal de $100, a.pdf
Anders, Inc., tiene 15,000 acciones del 4, valor nominal de $100, a.pdfAnders, Inc., tiene 15,000 acciones del 4, valor nominal de $100, a.pdf
Anders, Inc., tiene 15,000 acciones del 4, valor nominal de $100, a.pdf
 

Recently uploaded

Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 

Recently uploaded (20)

Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 

animation.#include windows.h#include GLglut.h#inclu.pdf

  • 1. animation. #include #include #include #include #include #include #include animation. #include #include #include #include #include #include #include bool rotate1=false, rotate2=false; double t; double dt=0.1; double angle1=0; double dangle1 =20; double angle2=0; double dangle2 =20; double R=5;//radius spiral double T=20;//time interval double shiftx,shifty,shiftz; bool origin=true; void output_Text(float x, float y, char *text) { int len, i; glColor3f(1, 0, 0); //red text glRasterPos3f(x, y, 0); len = (int)strlen(text);
  • 2. for (i = 0; i < len; i++) { glutBitmapCharacter(GLUT_BITMAP_8_BY_13, text[i]); } } void Time_Delay(int dur) { clock_t start_time; start_time = clock(); while ((clock() - start_time) < dur) { } } float ax[3]={25,0,0}; float ay[3]={0,25,0}; float az[3]={0,0,25};//axes void plot_Arrow(float v1[3], float v2[3]) //plot arrow { glBegin(GL_LINES); glVertex3fv(v1); glVertex3fv(v2); glEnd(); } void plot_Vector(float v[3]) //plot vector { float zero[3]={0,0,0}; plot_Arrow(zero,v); } void plot_Axis() { glColor3f(0,0,0); plot_Vector(ax); plot_Vector(ay); plot_Vector(az); } void Draw_Trajectory() { //your code } void myInit3d(void) { glClearColor(1,1,1,0); glColor3f(1.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); // clear the screen glMatrixMode(GL_PROJECTION);
  • 3. glLoadIdentity(); // reset the Current Modelview Matrix bool rotate1=false, rotate2=false; double t; double dt=0.1; double angle1=0; double dangle1 =20; double angle2=0; double dangle2 =20; double R=5;//radius spiral double T=20;//time interval double shiftx,shifty,shiftz; bool origin=true; void output_Text(float x, float y, char *text) { int len, i; glColor3f(1, 0, 0); //red text glRasterPos3f(x, y, 0); len = (int)strlen(text); for (i = 0; i < len; i++) { glutBitmapCharacter(GLUT_BITMAP_8_BY_13, text[i]); } } void Time_Delay(int dur) { clock_t start_time; start_time = clock(); while ((clock() - start_time) < dur) { } } float ax[3]={25,0,0}; float ay[3]={0,25,0}; float az[3]={0,0,25};//axes void plot_Arrow(float v1[3], float v2[3]) //plot arrow { glBegin(GL_LINES); glVertex3fv(v1); glVertex3fv(v2); glEnd(); } void plot_Vector(float v[3]) //plot vector { float zero[3]={0,0,0}; plot_Arrow(zero,v); } void plot_Axis()
  • 4. { glColor3f(0,0,0); plot_Vector(ax); plot_Vector(ay); plot_Vector(az); } void Draw_Trajectory() { //your code } void myInit3d(void) { glClearColor(1,1,1,0); glColor3f(1.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); // clear the screen glMatrixMode(GL_PROJECTION); glLoadIdentity(); // reset the Current Modelview Matrix //the coordinate system, the window and glLookAt in your assigment //can be different glMatrixMode(GL_MODELVIEW); // position and aim the camera glLoadIdentity(); gluPerspective(45, 1.33, .01, 1000); gluLookAt(30.0, 30.0, 30.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); } void myDisplay(void) { //your code } void Do_Nothing(void) {} void myMouse(int button, int state, int x, int y) //press left/right button { switch (button) { case GLUT_LEFT_BUTTON: if (state == GLUT_DOWN) if (rotate1) rotate1=false; else rotate1=true; break; case GLUT_RIGHT_BUTTON: if (state == GLUT_DOWN) {if (rotate2) rotate2 =false; else rotate2=true;} break; default:break; } } main(int argc, char **argv)
  • 5. { glutInit(&argc, argv); glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB); glutInitWindowSize (500, 500); glutInitWindowPosition (100, 100); glutCreateWindow ("Problem 7"); myInit3d(); glutDisplayFunc(myDisplay); glutIdleFunc(myDisplay); glutMouseFunc(myMouse); glutMainLoop(); } //the coordinate system, the window and glLookAt in your assigment //can be different glMatrixMode(GL_MODELVIEW); // position and aim the camera glLoadIdentity(); gluPerspective(45, 1.33, .01, 1000); gluLookAt(30.0, 30.0, 30.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); } void myDisplay(void) { //your code } void Do_Nothing(void) {} void myMouse(int button, int state, int x, int y) //press left/right button { switch (button) { case GLUT_LEFT_BUTTON: if (state == GLUT_DOWN) if (rotate1) rotate1=false; else rotate1=true; break; case GLUT_RIGHT_BUTTON: if (state == GLUT_DOWN) {if (rotate2) rotate2 =false; else rotate2=true;} break; default:break; } } main(int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB); glutInitWindowSize (500, 500); glutInitWindowPosition (100, 100); glutCreateWindow ("Problem 7"); myInit3d(); glutDisplayFunc(myDisplay); glutIdleFunc(myDisplay); glutMouseFunc(myMouse); glutMainLoop();