SlideShare a Scribd company logo
PROGRAMA DE OBJETOS 3D WIRE (ALAMBRE)
           #include<GL/glut.h>
           #include <GL/gl.h>

           voidinicializa(void){
           glClearColor(1.0,1.0,1.0,0.0);
           }
           voiddibuja(void){
           glClear(GL_COLOR_BUFFER_BIT);
           glColor3f(1.0,0.0,0.0); // el color de nuestra figura
           gluLookAt(5.0,5.0,5.0,0.0,0.0,0.0,0.0,1.0,0.0);
           glPushMatrix();
           glScalef(1.0,1.0,1.0);
           glRotatef(10.0,1.0,0.0,0.0);
           glTranslatef(2.0,0.0,0.0);
           glutWireCube(1.0);
           glPopMatrix();

           glFlush();
           }

           voidReshapeFun(int w, int h){
           glViewport(0,0,w,h);
           glMatrixMode(GL_PROJECTION);
           glFrustum(-4.0,4.0,-4.0,4.0,4.0,40.0);
           glMatrixMode(GL_MODELVIEW);
           glClear(GL_COLOR_BUFFER_BIT);
           }

           int main (intargc, char** argv)
           {
           glutInit(&argc, argv);
           glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
           glutInitWindowPosition(1,1);
           glutInitWindowSize(1000,700);
           glutCreateWindow("Objetos 3D");
           inicializa();
           glutDisplayFunc(dibuja);
           glutReshapeFunc(ReshapeFun);
           glutMainLoop();
           return 0;
           }

          Utilizar las siguientes instrucciones
glutWireCube(tamaño);                                              glutWireCone(radio, alt, reph, repv);
glutWireTeapot(tamaño);                                            glutWireTorus(radio,radcentro,reph, repv);
glutWireDodecahedron();                                            glutWireOctahedron();
glutWireSphere(radio,reph,repv);                                   glutWireTetrahedron();

More Related Content

DOCX
computer graphics at openGL
TXT
Ass day2 2_rotating my name (robi)
PPTX
Open gl polygon code review
TXT
Snake.c
DOCX
computer graphics at openGL (2)
DOCX
DOCX
Program membalik kata
computer graphics at openGL
Ass day2 2_rotating my name (robi)
Open gl polygon code review
Snake.c
computer graphics at openGL (2)
Program membalik kata

What's hot (10)

PDF
Coding with Vim
PDF
Bitcoin:Next
PPTX
C & Python Introduction
PDF
Reverse string
PDF
Fragmentation
PDF
Grafika komputer 2
DOCX
2 d rotation
TXT
Trip itparsing
PDF
Understanding the nodejs event loop
Coding with Vim
Bitcoin:Next
C & Python Introduction
Reverse string
Fragmentation
Grafika komputer 2
2 d rotation
Trip itparsing
Understanding the nodejs event loop
Ad

Viewers also liked (18)

PPTX
[SLIDE FACTORY] [S21] Lê Ngọc Hà - Bài tốt nghiệp
PDF
Zsófi Major - Drupal Camp Organization: The Good Parts
PPT
SafeCare presentation 2013.06.07
PDF
Menú feb 13
PPTX
Weed Control Odessa TX
ODP
House of the future
PDF
Apocalipsa nt
PPTX
Activité 4 livrable1 Alise R-B
PPTX
presentacion del ensayo dhtic's reciclaje
PPTX
Présentation Bekara Conciergerie 020316
PPTX
Clase 5-cationes g2-1 parte-Hg-Bi-Cu-Cd
PDF
Reflections. Torrevieja 2012
PDF
Entrevistado por Instagrameando.com
PPTX
Clase 4-marcha del grupo 1
PPTX
Casa do Futuro
PDF
Managing Consumer Data Privacy
PDF
[SLIDE FACTORY] CV Slide - Nguyễn Thị Lan Phượng
PDF
"Arquitectura en la fotografía móvil"
[SLIDE FACTORY] [S21] Lê Ngọc Hà - Bài tốt nghiệp
Zsófi Major - Drupal Camp Organization: The Good Parts
SafeCare presentation 2013.06.07
Menú feb 13
Weed Control Odessa TX
House of the future
Apocalipsa nt
Activité 4 livrable1 Alise R-B
presentacion del ensayo dhtic's reciclaje
Présentation Bekara Conciergerie 020316
Clase 5-cationes g2-1 parte-Hg-Bi-Cu-Cd
Reflections. Torrevieja 2012
Entrevistado por Instagrameando.com
Clase 4-marcha del grupo 1
Casa do Futuro
Managing Consumer Data Privacy
[SLIDE FACTORY] CV Slide - Nguyễn Thị Lan Phượng
"Arquitectura en la fotografía móvil"
Ad

Similar to Programa de objetos 3 d wire (20)

PPTX
CGLabLec6.pptx
PDF
FLTK Summer Course - Part VIII - Eighth Impact - Exercises
DOCX
computer graphics slides by Talha shah
DOCX
Lab Practices and Works Documentation / Report on Computer Graphics
PPT
Open gl
PPTX
Opengl presentation
PPT
Programming with OpenGL
PPT
CS 354 Transformation, Clipping, and Culling
DOCX
Manual
PDF
The Ring programming language version 1.9 book - Part 154 of 210
PDF
Development with OpenGL and Qt
PDF
The Ring programming language version 1.9 book - Part 163 of 210
DOCX
computer graphics opengl programs for cse students
PDF
The Ring programming language version 1.5.1 book - Part 139 of 180
PDF
Modern OpenGL Usage: Using Vertex Buffer Objects Well
PPT
Intro to Computer Graphics.ppt
PPT
opengl.ppt
PDF
The Ring programming language version 1.5.3 book - Part 120 of 184
PDF
The Ring programming language version 1.5.4 book - Part 138 of 185
PDF
The Ring programming language version 1.10 book - Part 198 of 212
CGLabLec6.pptx
FLTK Summer Course - Part VIII - Eighth Impact - Exercises
computer graphics slides by Talha shah
Lab Practices and Works Documentation / Report on Computer Graphics
Open gl
Opengl presentation
Programming with OpenGL
CS 354 Transformation, Clipping, and Culling
Manual
The Ring programming language version 1.9 book - Part 154 of 210
Development with OpenGL and Qt
The Ring programming language version 1.9 book - Part 163 of 210
computer graphics opengl programs for cse students
The Ring programming language version 1.5.1 book - Part 139 of 180
Modern OpenGL Usage: Using Vertex Buffer Objects Well
Intro to Computer Graphics.ppt
opengl.ppt
The Ring programming language version 1.5.3 book - Part 120 of 184
The Ring programming language version 1.5.4 book - Part 138 of 185
The Ring programming language version 1.10 book - Part 198 of 212

More from René Domínguez (20)

DOC
Manual de prácticas
PPTX
Microprocesador
PPTX
Ensamble pc
PDF
Como crear blog
DOCX
Antologia electronica basica
DOCX
Evaluación diagnóstica
DOCX
Examen redes
DOCX
Hoja de revisión de prácticas
DOCX
La importancia del algebra booleana en mi mercado laboral y practica profesional
DOCX
Lenguajes de programación java
DOCX
Lenguajes de programación
DOCX
Practicas 16 agosto 2012
DOCX
Practicas java
PDF
Curso De Formadores de Turores
PDF
Apuntes de Ensamble
DOC
Manual practicas Electricidad y magnetismo
PDF
PDF
Conjuntos
PDF
Conjuntos
PDF
Simulador de juego piedra
Manual de prácticas
Microprocesador
Ensamble pc
Como crear blog
Antologia electronica basica
Evaluación diagnóstica
Examen redes
Hoja de revisión de prácticas
La importancia del algebra booleana en mi mercado laboral y practica profesional
Lenguajes de programación java
Lenguajes de programación
Practicas 16 agosto 2012
Practicas java
Curso De Formadores de Turores
Apuntes de Ensamble
Manual practicas Electricidad y magnetismo
Conjuntos
Conjuntos
Simulador de juego piedra

Recently uploaded (20)

PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Complications of Minimal Access Surgery at WLH
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
Institutional Correction lecture only . . .
PPTX
Cell Types and Its function , kingdom of life
PDF
Computing-Curriculum for Schools in Ghana
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
GDM (1) (1).pptx small presentation for students
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Complications of Minimal Access Surgery at WLH
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
O5-L3 Freight Transport Ops (International) V1.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
TR - Agricultural Crops Production NC III.pdf
Institutional Correction lecture only . . .
Cell Types and Its function , kingdom of life
Computing-Curriculum for Schools in Ghana
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Anesthesia in Laparoscopic Surgery in India
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
GDM (1) (1).pptx small presentation for students
2.FourierTransform-ShortQuestionswithAnswers.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Supply Chain Operations Speaking Notes -ICLT Program
human mycosis Human fungal infections are called human mycosis..pptx
Renaissance Architecture: A Journey from Faith to Humanism

Programa de objetos 3 d wire

  • 1. PROGRAMA DE OBJETOS 3D WIRE (ALAMBRE) #include<GL/glut.h> #include <GL/gl.h> voidinicializa(void){ glClearColor(1.0,1.0,1.0,0.0); } voiddibuja(void){ glClear(GL_COLOR_BUFFER_BIT); glColor3f(1.0,0.0,0.0); // el color de nuestra figura gluLookAt(5.0,5.0,5.0,0.0,0.0,0.0,0.0,1.0,0.0); glPushMatrix(); glScalef(1.0,1.0,1.0); glRotatef(10.0,1.0,0.0,0.0); glTranslatef(2.0,0.0,0.0); glutWireCube(1.0); glPopMatrix(); glFlush(); } voidReshapeFun(int w, int h){ glViewport(0,0,w,h); glMatrixMode(GL_PROJECTION); glFrustum(-4.0,4.0,-4.0,4.0,4.0,40.0); glMatrixMode(GL_MODELVIEW); glClear(GL_COLOR_BUFFER_BIT); } int main (intargc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowPosition(1,1); glutInitWindowSize(1000,700); glutCreateWindow("Objetos 3D"); inicializa(); glutDisplayFunc(dibuja); glutReshapeFunc(ReshapeFun); glutMainLoop(); return 0; } Utilizar las siguientes instrucciones glutWireCube(tamaño); glutWireCone(radio, alt, reph, repv); glutWireTeapot(tamaño); glutWireTorus(radio,radcentro,reph, repv); glutWireDodecahedron(); glutWireOctahedron(); glutWireSphere(radio,reph,repv); glutWireTetrahedron();