1 / 12

Polyhedra dan Quadric

Polyhedra dan Quadric. Praktikum 11. Dari : http://www.cs.sjsu.edu/~teoh/teaching/previous/cs116a_fa09/lectures/lecture09b_polyhedra_curved.ppt. Objek 3D. Objek 3D biasanya dibentuk dengan polyhedra Polyhedra dibentuk dari sekumpulan poligon yang disambung-sambung

Download Presentation

Polyhedra dan Quadric

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Polyhedra dan Quadric Praktikum 11 Dari : http://www.cs.sjsu.edu/~teoh/teaching/previous/cs116a_fa09/lectures/lecture09b_polyhedra_curved.ppt

  2. Objek 3D • Objek 3D biasanya dibentuk dengan polyhedra • Polyhedra dibentuk dari sekumpulan poligon yang disambung-sambung • Di OpenGL, polyhedra dapat dibuat dengan objek 2D dasar, seperti GL_QUADS, GL_POLYGON, atau GL_TRIANGLES

  3. Polyhedra Beraturan • Polyhedra beraturan semua sisinya mirip • Contoh: • Tetrahedron beraturan : 4 sisi • Hexahedron beraturan (kubus) : 6 sisi • Octahedron beraturan : 8 sisi • Dodecahedron beraturan : 12 sisi • Icosahedron beraturan : 20 sisi

  4. Polyhedra Beraturan

  5. Fungsi di GLUT • GLUT menyediakan fungsi siap pakai untuk 5 jenis polyhedra beraturan Semua objek akan digambar secara default di titik 0,0

  6. Permukaan Quadric • Permukaan yang lengkung • Biasanya didekati dengan segiempat-segiempat • Bola • Kerucut • Torus

  7. Fungsi di GLUT • Slices dan stacks menyatakan seberapa detail objek akan dibuat

  8. GLUT Sphere Slices Stacks

  9. GLUT Torus slices stacks r_dalam r_luar axis

  10. Silinder dan Disk GLUquadricObj *optr; optr = gluNewQuadric(); gluQuadricDrawStyle(optr,GLU_FILL); // GLU_LINE atau GLU_FILL gluCylinder(optr,1.0,1.0,2.0,10.0,2.0); // ptr, rbase, rtop, height, slices, stacks // alas berada pada sumbu z gluDisk(optr, 0.0,1.0,10.0,2.0); // ptr, rInner, rOuter, nRadii, nRings // pada bidang (x,y) Disk dengan nRadii = 8 dan nRings = 2

  11. Bonus : GLUT Teapot • Utah teapot(dibuat oleh Martin Newell pada 1975) glutSolidTeapot(ukuran); glutWireTeapot(ukuran);

  12. 3D di GLUT • Ambil dari http://pastie.org/2895031

More Related