{"id":20328,"date":"2023-08-10T20:27:05","date_gmt":"2023-08-11T03:27:05","guid":{"rendered":"https:\/\/www.kith.org\/jed\/?page_id=20328"},"modified":"2023-08-14T11:55:24","modified_gmt":"2023-08-14T18:55:24","slug":"examples-from-the-vrml-2-0-handbook-chapters-7-8-part-2","status":"publish","type":"page","link":"https:\/\/www.kith.org\/jed\/hodgepodge\/code\/3d-graphics-in-vrml\/examples-from-the-vrml-2-0-handbook\/examples-from-the-vrml-2-0-handbook-chapters-7-8-part-2\/","title":{"rendered":"Examples from the VRML 2.0 Handbook: chapters 7-8, part 2"},"content":{"rendered":"\r\n<script src=\"https:\/\/create3000.github.io\/code\/x_ite\/latest\/x_ite.min.js\"><\/script>\r\n<style>\r\nx3d-canvas {\r\n  width: 600px;\r\n  height: 300px;\r\n}\r\ndiv.x3d-canvas {\r\n  width: 600px;\r\n  margin-left: auto;\r\n  margin-right: auto;\r\n}\r\np.download {\r\n  text-align: center;\r\n  text-indent: 0;\r\n  margin: 10px;\r\n}\r\nhr {\r\n  margin-top: 40px;\r\n  margin-bottom: 40px;\r\n}\r\n<\/style>\r\n\r\n<p>This page shows the example 3D models from the second half of chapter 8 of the <cite>The VRML 2.0 Handbook<\/cite>, by Jed Hartman and Josie Wernecke. For more information, see my main <a href=\"https:\/\/www.kith.org\/jed\/hodgepodge\/code\/3d-graphics-in-vrml\/examples-from-the-vrml-2-0-handbook\/\">Handbook examples page<\/a>.<\/p>\r\n<p>In some cases, the download links download a Zip file containing the main VRML file plus any other associated files that the main file relies on, such as textures.<\/p>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 8-5: Specifying normals per face<\/h2\r\n<p>Shows three connected flat pieces, with a sharp dividing line at each edge.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.05.norm.face.wrl\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20398\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 206px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-5.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-5.gif\" alt=\"Example 8-5.\" width=\"196\" height=\"122\" class=\"size-full wp-image-20398\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 8-5.<\/figcaption><\/figure>\r\n<h3>Live demo<\/h3>\r\n<div class=\"x3d-canvas\">\r\n<x3d-canvas src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.05.norm.face.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 8-6: Specifying normals per vertex<\/h2\r\n<p>Shows three connected flat pieces, with curved\/smooth-looking joins between them.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.06.norm.vert.wrl\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20399\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 206px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-6.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-6.gif\" alt=\"Example 8-6.\" width=\"196\" height=\"122\" class=\"size-full wp-image-20399\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 8-6.<\/figcaption><\/figure>\r\n<h3>Live demo<\/h3>\r\n<div class=\"x3d-canvas\">\r\n<x3d-canvas src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.06.norm.vert.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 8-7: Specifying indexed vertex normals<\/h2\r\n<p> Shows three connected flat pieces, with one hard edge and one smooth one.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.07.norm.verti.wrl\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20400\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 206px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-7.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-7.gif\" alt=\"Example 8-7.\" width=\"196\" height=\"122\" class=\"size-full wp-image-20400\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 8-7.<\/figcaption><\/figure>\r\n<h3>Live demo<\/h3>\r\n<div class=\"x3d-canvas\">\r\n<x3d-canvas src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.07.norm.verti.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 8-8: Combining color per vertex with a one-component texture<\/h2\r\n<p>Shows a knife with a texture image on it.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.08.knife.zip\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20401\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 206px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-8.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-8.gif\" alt=\"Example 8-8.\" width=\"196\" height=\"122\" class=\"size-full wp-image-20401\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 8-8.<\/figcaption><\/figure>\r\n<h3>Live demo<\/h3>\r\n<div class=\"x3d-canvas\">\r\n<x3d-canvas src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.08.knife.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 8-9: Using default texture mapping<\/h2>\r\n<p>Shows the temple roof with a texture mapped onto it. The default texture mapping may differ from one VRML viewer to another. For example, one viewer may map to the front face of the object, whereas another may map to the top of the object. The safest way to ensure that mapping works the same across all browsers is to specify texture coordinates explicitly.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.09.texmap.default.zip\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20402\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 199px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-9.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-9.gif\" alt=\"Example 8-9.\" width=\"189\" height=\"122\" class=\"size-full wp-image-20402\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 8-9.<\/figcaption><\/figure>\r\n<h3>Live demo<\/h3>\r\n<div class=\"x3d-canvas\">\r\n<x3d-canvas src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.09.texmap.default.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 8-10: Specifying texture coordinates<\/h2>\r\n<p>Shows the temple roof with a texture mapped onto it.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.10.texcoord.zip\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20403\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 199px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-10.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-10.gif\" alt=\"Example 8-10.\" width=\"189\" height=\"122\" class=\"size-full wp-image-20403\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 8-10.<\/figcaption><\/figure>\r\n<h3>Live demo<\/h3>\r\n<div class=\"x3d-canvas\">\r\n<x3d-canvas src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.10.texcoord.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 8-11: Scaling a texture<\/h2\r\n<p>Shows the temple roof with a texture mapped onto it.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.11.texform.zip\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20404\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 198px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-11.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-11.gif\" alt=\"Example 8-11.\" width=\"188\" height=\"123\" class=\"size-full wp-image-20404\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 8-11.<\/figcaption><\/figure>\r\n<h3>Live demo<\/h3>\r\n<div class=\"x3d-canvas\">\r\n<x3d-canvas src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.11.texform.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 8-12: Repeating and clamping textures<\/h2>\r\n<p>Shows the temple roof with a texture mapped onto it.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.12.repeat.zip\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20405\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 199px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-12.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-12.gif\" alt=\"Example 8-12.\" width=\"189\" height=\"123\" class=\"size-full wp-image-20405\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 8-12.<\/figcaption><\/figure>\r\n<h3>Live demo<\/h3>\r\n<div class=\"x3d-canvas\">\r\n<x3d-canvas src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.12.repeat.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 8-13: Specifying a pixel texture<\/h2>\r\n<p>Shows a sphere with a four-color texture mapped onto it.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.13.pixeltex.wrl\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20406\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 206px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-13.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-13.gif\" alt=\"Example 8-13.\" width=\"196\" height=\"122\" class=\"size-full wp-image-20406\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 8-13.<\/figcaption><\/figure>\r\n<h3>Live demo<\/h3>\r\n<div class=\"x3d-canvas\">\r\n<x3d-canvas src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.13.pixeltex.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 8-15: Specifying ground colors<\/h2\r\n<p>Shows a green ground half-sphere<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.15.ground.wrl\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20407\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 206px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-15.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-15.gif\" alt=\"Example 8-15.\" width=\"196\" height=\"122\" class=\"size-full wp-image-20407\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 8-15.<\/figcaption><\/figure>\r\n<h3>Live demo<\/h3>\r\n<div class=\"x3d-canvas\">\r\n<x3d-canvas src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.15.ground.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 8-16: Specifying sky colors<\/h2>\r\n<p>Shows a blue sky.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.16.sky.wrl\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20408\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 206px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-16.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/8-16.gif\" alt=\"Example 8-16.\" width=\"196\" height=\"122\" class=\"size-full wp-image-20408\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 8-16.<\/figcaption><\/figure>\r\n<h3>Live demo<\/h3>\r\n<div class=\"x3d-canvas\">\r\n<x3d-canvas src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/08.16.sky.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":5,"featured_media":0,"parent":20177,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-20328","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/pages\/20328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/comments?post=20328"}],"version-history":[{"count":11,"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/pages\/20328\/revisions"}],"predecessor-version":[{"id":20509,"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/pages\/20328\/revisions\/20509"}],"up":[{"embeddable":true,"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/pages\/20177"}],"wp:attachment":[{"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/media?parent=20328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}