{"id":6,"date":"2008-09-10T03:01:57","date_gmt":"2008-09-10T01:01:57","guid":{"rendered":"http:\/\/blog.teleranek.org\/?p=6"},"modified":"2025-06-29T12:29:30","modified_gmt":"2025-06-29T10:29:30","slug":"rotating-rings-with-shadows-and-reflections-and-a-pv3d-primitive","status":"publish","type":"post","link":"https:\/\/blog.teleranek.org\/?p=6","title":{"rendered":"Rotating rings with shadows and reflections and a pv3d primitive"},"content":{"rendered":"<p><a href=\"http:\/\/exp.teleranek.org\/ring\/\"><img loading=\"lazy\" decoding=\"async\" style=\"vertical-align: middle;\" src=\"http:\/\/exp.teleranek.org\/blog\/img\/rings.png\" alt=\"\" width=\"520\" height=\"342\" \/><\/a><\/p>\n<p>I have made this two simulations of rotating rings. First one, is a bit more interactive &#8211; you can change position of the camera by dragging mouse cursor. Second one is fully prebuffered, thus you can only click on stage, and watch how the rings are rotating.<\/p>\n<p>Shadows and reflections were made using Andy Zupko&#8217;s classes ( blog.zupko.info ). They were also tweaked to look like projected on convex surface.<\/p>\n<p><a href=\"http:\/\/exp.teleranek.org\/ring\/ring1\" target=\"_blank\" rel=\"noopener noreferrer\">First demo<\/a> is a cpu killer, despite some modifications, and prebuffered shadows ( after prebuffering, shadows are animated on the floor plane ). On 1Ghz it will probably have something around 10fps. I could lower the details, but this demo is all about details:)<\/p>\n<p><a href=\"http:\/\/exp.teleranek.org\/ring\/ring2\" target=\"_blank\" rel=\"noopener noreferrer\">Second demo<\/a> is also a cpu killer, but only during the prebuffering phase. It has some details smoothed, and features two animations, chosen randomly after clicking on stage.<\/p>\n<p>To make this demo, I needed genereric model of a <a href=\"http:\/\/exp.teleranek.org\/ring\/Ring.as\">ring<\/a> with proper texture mapping &#8211; so i modified cylinder primitive from Papervision3D. To make a new <a href=\"http:\/\/unitra.nazwa.pl\/ring\/Ring.as\">Ring<\/a>:<\/p>\n<p><span style=\"color: #000080;\"><code>new Ring( material , radius , height, subradius , segmentsW , segmentsH , topFace , bottomFace )<\/code><\/span><\/p>\n<p><em>material &#8211; its for example new ColorMaterial( 0 )<\/em><\/p>\n<p><em>radius &#8211; radius of a ring, including wall thickness<\/em><\/p>\n<p><em>subradius &#8211; thickness of ring&#8217;s wall<\/em><\/p>\n<p><em>segmentsW &#8211; more segmentsW, your ring will look less angular<\/em><\/p>\n<p><em>segmentsH &#8211; segments horizontally.<\/em><\/p>\n<p><em>topFace , bottomFace &#8211; if you dont include topFace and bottomFace, your ring will look like two extruded circles.<\/em><\/p>\n<p>You can download this class <a href=\"http:\/\/exp.teleranek.org\/ring\/Ring.as\">here<\/a> to make your own rings ( of course you need Papervision3D too )<\/p>\n<p>ps. I had to disable comments because spambots seems to like this post. Gosh, I hate this lamers who call themselves programmers and writes shit like this&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have made this two simulations of rotating rings. First one, is a bit more interactive &#8211; you can change position of the camera by dragging mouse cursor. Second one is fully prebuffered, thus you can only click on stage, and watch how the rings are rotating. Shadows and reflections were made using Andy Zupko&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[18,12,11,23,21,22],"class_list":["post-6","post","type-post","status-publish","format-standard","hentry","category-flash-experiments","tag-as3","tag-papervision","tag-pv3d","tag-reflections","tag-ring-model","tag-shadows"],"_links":{"self":[{"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=\/wp\/v2\/posts\/6","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6"}],"version-history":[{"count":1,"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=\/wp\/v2\/posts\/6\/revisions"}],"predecessor-version":[{"id":367,"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=\/wp\/v2\/posts\/6\/revisions\/367"}],"wp:attachment":[{"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.teleranek.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}