Enviar pesquisa
Carregar
ບົດລາຍງານ Honda gl09
•
0 gostou
•
533 visualizações
K
kesukei
Seguir
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 7
Baixar agora
Baixar para ler offline
Recomendados
Alejandro
Alejandro
Alejandro Gomez
openFrameworks addonを利用する ofxControlPanel ofxOpenCv - 多摩美メディアアートII
openFrameworks addonを利用する ofxControlPanel ofxOpenCv - 多摩美メディアアートII
Atsushi Tadokoro
Info clasa
Info clasa
Ilinca Ostroschi
openFrameworks 外部ファイルを利用する - 画像、動画 - 多摩美メディアアートII
openFrameworks 外部ファイルを利用する - 画像、動画 - 多摩美メディアアートII
Atsushi Tadokoro
c ++ informe Nº5 ucsm
c ++ informe Nº5 ucsm
Isaac Aquino
Vcs21
Vcs21
Malikireddy Bramhananda Reddy
openFrameworks基礎 - 新規プロジェクトの作成、図形を描く 芸大グラフィクスプログラミングB
openFrameworks基礎 - 新規プロジェクトの作成、図形を描く 芸大グラフィクスプログラミングB
Atsushi Tadokoro
Sbaw091013
Sbaw091013
Atsushi Tadokoro
Recomendados
Alejandro
Alejandro
Alejandro Gomez
openFrameworks addonを利用する ofxControlPanel ofxOpenCv - 多摩美メディアアートII
openFrameworks addonを利用する ofxControlPanel ofxOpenCv - 多摩美メディアアートII
Atsushi Tadokoro
Info clasa
Info clasa
Ilinca Ostroschi
openFrameworks 外部ファイルを利用する - 画像、動画 - 多摩美メディアアートII
openFrameworks 外部ファイルを利用する - 画像、動画 - 多摩美メディアアートII
Atsushi Tadokoro
c ++ informe Nº5 ucsm
c ++ informe Nº5 ucsm
Isaac Aquino
Vcs21
Vcs21
Malikireddy Bramhananda Reddy
openFrameworks基礎 - 新規プロジェクトの作成、図形を描く 芸大グラフィクスプログラミングB
openFrameworks基礎 - 新規プロジェクトの作成、図形を描く 芸大グラフィクスプログラミングB
Atsushi Tadokoro
Sbaw091013
Sbaw091013
Atsushi Tadokoro
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Mais conteúdo relacionado
Destaque
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Destaque
(20)
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
ບົດລາຍງານ Honda gl09
1.
ຍ຺ຈຣາງຄາຌ
ິ ວຠພິຽຉີກຢາຟກ ໄ ຺ຂ: Motion Shape ັ ລວຌຈງ: ວ. ຌິຢຌກຸ ຌ ກຸໃ ຠ: HondaGL09 . ຨວຌຈໄາ ຌາກລຄັຌ . ູຠຠີ ພິຠຠະັກ ຌ. ວາແພວຌ ກໄພິຣາ
2.
I.
ພາກລະຽໜີ ໄ ໄ ໃ ີ ໃ ຎຢກຢຠຌີລໄາຄຂຌຈໄງ OpenGL ຽຆິຄແຈໄຠກາຌຌາເຆໄ Header File “glut.h” ຽຆິຄຽຎຌ ັ Header File ີຣຠຽວ຺າຽໃ ວຄຠເຌກາຌຂຼຌ OpenGL ຽວ຺າແໄ. ພາງເຌຎຢກຢຠແຈໄຌາລະຽໜີ ໃ ກາຌລໄາຄພາຍຽໃ ວຌແຈໄງກາຌຽຣວກຉ຺ຽຣວກ ຽຆິຄຠີຈງກັຌັຄໝ຺ຈມູໃ 3 ຉ຺ຽຣວກຈໄງກັຌ ໃ ໄ : Motion, Stencil On, Stencil Off. II. ັ ພາກຎະຉິຍຈ ກາຌຽຨັຈຼກຂວຄຎຢກຢຠຠໃ ຌຽກີຈາກກາຌຣິກຂາຣໄຽຣວກຉ຺ຽຣວກ Motion, ໃ Stencil On ຣະ Stencil Off ຈັຄຨູ ຍພາຍ: ກາຌຽຣວກຉ຺ຽຣວກ “Motion”
3.
ກາຌຽຣວກຉ຺ຽຣວກ “Stencil Off” ກາຌຽຣວກຉ຺ຽຣວກ “Stencil On”
4.
III.
Code ັຄໝ຺ຈ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <GL/glut.h> static int stencilOn = 1; /* function declarations */ void drawScene(void), setMatrix(void), animation(void), resize(int w, int h), keyboard(unsigned char c, int x, int y), menu(int choice), drawWireframe(int face), drawFilled(int face); /* global variables */ float ax, ay, az; /* angles for animation */ /* coords of a cube */ static GLfloat cube[8][3] = {0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0, 0.0}; static int faceIndex[6][4] = {0, 1, 2, 3, 1, 4, 5, 2, 4, 7, 6, 5, 7, 0, 3, 6, 3, 2, 5, 6, 7, 4, 1, 0}; int main(int argc, char **argv) { glutInit(&argc, argv); glutInitWindowSize(400, 400); glutInitDisplayMode(GLUT_RGB | GLUT_STENCIL | GLUT_DOUBLE | GLUT_DEPTH); glutCreateWindow("Stenciled hidden surface removal"); ax = 10.0; ay = -10.0; az = 0.0; glutDisplayFunc(drawScene); glutReshapeFunc(resize); glutCreateMenu(menu); glutAddMenuEntry("Motion", 3); glutAddMenuEntry("Stencil on", 1); glutAddMenuEntry("Stencil off", 2); glutAttachMenu(GLUT_RIGHT_BUTTON);
5.
glutKeyboardFunc(keyboard);
glutMainLoop(); return 0; /* ANSI C requires main to return int. */ } void drawWireframe(int face) { int i; glBegin(GL_LINE_LOOP); for (i = 0; i < 4; i++) glVertex3fv((GLfloat *) cube[faceIndex[face][i]]); glEnd(); } void drawFilled(int face) { int i; glBegin(GL_POLYGON); for (i = 0; i < 4; i++) glVertex3fv((GLfloat *) cube[faceIndex[face][i]]); glEnd(); } void drawScene(void) { int i; glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LEQUAL); glClearColor(0.5, 0.5, 0.5, 0.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glPushMatrix(); glRotatef(ax, 1.0, 0.0, 0.0); glRotatef(-ay, 0.0, 1.0, 0.0); /* all the good stuff follows */ if (stencilOn) { glEnable(GL_STENCIL_TEST); glClear(GL_STENCIL_BUFFER_BIT); glStencilMask(1); glStencilFunc(GL_ALWAYS, 0, 1); glStencilOp(GL_INVERT, GL_INVERT, GL_INVERT); } glColor3f(1.0, 1.0, 0.0); for (i = 0; i < 6; i++) { drawWireframe(i); if (stencilOn) { glStencilFunc(GL_EQUAL, 0, 1); glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); } glColor3f(1.0, 0.0, 1.0); drawFilled(i);
6.
glColor3f(1.0, 1.0, 0.0);
if (stencilOn) { glStencilFunc(GL_ALWAYS, 0, 1); glStencilOp(GL_INVERT, GL_INVERT, GL_INVERT); } glColor3f(1.0, 1.0, 0.0); drawWireframe(i); } glPopMatrix(); if (stencilOn) glDisable(GL_STENCIL_TEST); /* end of good stuff */ glutSwapBuffers(); } void setMatrix(void) { glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-2.0, 2.0, -2.0, 2.0, -2.0, 2.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); } int count = 0; void animation(void) { /* animate the cone */ ax += 5.0; ay -= 2.0; az += 5.0; if (ax >= 360) ax = 0.0; if (ay <= -360) ay = 0.0; if (az >= 360) az = 0.0; glutPostRedisplay(); count++; if (count >= 60) glutIdleFunc(NULL); } void menu(int choice) { switch (choice) { case 3: count = 0; glutIdleFunc(animation); break; case 2:
7.
stencilOn = 0;
glutSetWindowTitle("Stencil Disabled"); glutPostRedisplay(); break; case 1: stencilOn = 1; glutSetWindowTitle("Stencil Enabled"); glutPostRedisplay(); break; } } /* ARGSUSED1 */ void keyboard(unsigned char c, int x, int y) { switch (c) { case 27: exit(0); break; default: break; } } void resize(int w, int h) { glViewport(0, 0, w, h); setMatrix(); } IV. ພາກລະົຸຍ - ລະົຸຍຈງງ ໄ ໃ ໄ ໃ ຏາຌກາຌຂຼຌຎຢກຢຠແຈໄເໄຨູຽຊິຄາລັຄເຌກາຌຉໄຠຨູ ຍຉໃ າຄໂ, ກາຌໝູຌຨວຍຈໄງ Rotate ຣະກາຌຽໃ ວຌງໄາງັຈຊຸ ຈໄງ Translate - ໄ ຂ຺ຄໄາຄ ໃ ໃ ໃ ໄ ໄ ໃ ເຌກາຌຂຼຌຎຢກຢຠງັຄຠີຍາຄລໃ ຌີງັຄຍັຌ຺ຍຊໄຌ ຽຆັຌກາຌເຆໄຽຠ຺າ ລະຌັຌ, ຶຄມາກ ໄ ໄ ໃ ັ ໃ ພັຈະຌາຎຢກຢຠຌີຂຌຽພວຽຎຌຌາຄເຌກາຌພັຈະຌາເຌຣະຈັຍີລູ ຄຂຌ. ໄ
Baixar agora