{"id":20252,"date":"2023-08-08T14:05:21","date_gmt":"2023-08-08T21:05:21","guid":{"rendered":"https:\/\/www.kith.org\/jed\/?page_id=20252"},"modified":"2023-08-14T11:33:38","modified_gmt":"2023-08-14T18:33:38","slug":"examples-from-the-vrml-2-0-handbook-chapter-4-part-1","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-chapter-4-part-1\/","title":{"rendered":"Examples from the VRML 2.0 Handbook: chapter 4, part 1"},"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 first half of chapter 4 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>I\u2019ve left out example 4-1 because it\u2019s a small file that doesn\u2019t include any 3D structures.<\/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>Unnumbered example (ch. 4, p. 59): The complete small temple<\/h2>\r\n<p>This example is referred to in the book, and an image of the model is shown in Figure 4-1 of the book.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/Temple-and-texture.zip\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20355\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 205px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/temple.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/temple.gif\" alt=\"The complete temple.\" width=\"195\" height=\"121\" class=\"size-full wp-image-20355\" \/><\/a><figcaption class=\"caption wp-caption-text\">The complete temple.<\/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\/temple.complete.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 4-2: Rotating an object<\/h2>\r\n<p>Rotates the chacmool model by 1.57 radians, approximately 90 degrees.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/04.02.rotate.zip\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20359\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 206px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-2.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-2.gif\" alt=\"Example 4-2.\" width=\"196\" height=\"122\" class=\"size-full wp-image-20359\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 4-2.<\/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\/04.02.rotate.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 4-3: Combining transformations<\/h2\r\n<p>Shows the chacmool at the origin, and a scaled, rotated, and translated copy at its new location.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/04.03.chac.xform.zip\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20364\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 206px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-3.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-3.gif\" alt=\"Example 4-3.\" width=\"196\" height=\"122\" class=\"size-full wp-image-20364\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 4-3.<\/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\/04.03.chac.xform.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 4-4a: Rotation followed by translation, part 1<\/h2\r\n<p>Shows the rotation step from example 4-4, without the translation.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/04.04a.chac.rot.zip\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20365\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 206px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-4a.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-4a.gif\" alt=\"Example 4-4, part 1.\" width=\"196\" height=\"122\" class=\"size-full wp-image-20365\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 4-4, part 1.<\/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\/04.04a.chac.rot.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 4-4b: Rotation followed by translation, part 2<\/h2\r\n<p>Shows the translation step from example 4-4, after the rotation.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/04.04b.chac.rot.trans.zip\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20366\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 206px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-4b.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-4b.gif\" alt=\"Example 4-4, part 2.\" width=\"196\" height=\"122\" class=\"size-full wp-image-20366\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 4-4, part 2.<\/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\/04.04b.chac.rot.trans.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n\r\n<h2>Example 4-5a: Translation followed by rotation, part 1<\/h2\r\n<p>Shows the translation step from example 4-5, without the rotation.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/04.05a.chac.trans.zip\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20367\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 206px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-5a.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-5a.gif\" alt=\"Example 4-5, part 1.\" width=\"196\" height=\"122\" class=\"size-full wp-image-20367\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 4-5, part 1.<\/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\/04.05a.chac.trans.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 4-5b:  Translation followed by rotation, part 2<\/h2\r\n<p>Shows the rotation step from example 4-5, after the translation.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/04.05b.chac.trans.rot.zip\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20368\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 206px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-5b.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-5b.gif\" alt=\"Example 4-5, part 2.\" width=\"196\" height=\"122\" class=\"size-full wp-image-20368\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 4-5, part 2.<\/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\/04.05b.chac.trans.rot.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 4-6: Using a Box node<\/h2>\r\n<p>Creates the base of a column and moves it to its destination location.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/04.06.box.wrl\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20369\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 206px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-6.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-6.gif\" alt=\"Example 4-6.\" width=\"196\" height=\"122\" class=\"size-full wp-image-20369\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 4-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\/04.06.box.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Example 4-7: Placing a box in two different places<\/h2\r\n<p>Creates another instance of the column base in a different location.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/04.07.boxes.wrl\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20370\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 206px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-7.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-7.gif\" alt=\"Example 4-7.\" width=\"196\" height=\"122\" class=\"size-full wp-image-20370\" \/><\/a><figcaption class=\"caption wp-caption-text\">Example 4-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\/04.07.boxes.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\r\n<h2>Unnumbered example (p. 73): Scaling a box<\/h2>\r\n<p>Shows an alternative way to specify a box\u2019s dimensions.<\/p>\r\n<p class=\"download\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/04.scalebox.wrl\">Download<\/a><\/p>\r\n<h3>Preview image<\/h3>\r\n<figure id=\"attachment_20382\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 206px\"><a href=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-scalebox.gif\"><img src=\"https:\/\/www.kith.org\/jed\/wp-content\/uploads\/sites\/2\/2023\/08\/4-scalebox.gif\" alt=\"Unnumbered example.\" width=\"196\" height=\"122\" class=\"size-full wp-image-20382\" \/><\/a><figcaption class=\"caption wp-caption-text\">Unnumbered example.<\/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\/04.scalebox.wrl\"><\/x3d-canvas>\r\n<\/div>\r\n<hr width=\"25%\" \/>\r\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":5,"featured_media":0,"parent":20177,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-20252","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/pages\/20252","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=20252"}],"version-history":[{"count":25,"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/pages\/20252\/revisions"}],"predecessor-version":[{"id":20497,"href":"https:\/\/www.kith.org\/jed\/wp-json\/wp\/v2\/pages\/20252\/revisions\/20497"}],"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=20252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}