{"id":83,"date":"2018-02-04T14:36:28","date_gmt":"2018-02-04T22:36:28","guid":{"rendered":"https:\/\/www.vzome.com\/blog\/?p=83"},"modified":"2018-02-05T09:09:59","modified_gmt":"2018-02-05T17:09:59","slug":"using-pov-ray-for-ray-tracing-on-mac-os-x","status":"publish","type":"post","link":"https:\/\/www.vzome.com\/blog\/2018\/02\/using-pov-ray-for-ray-tracing-on-mac-os-x\/","title":{"rendered":"Using POV-Ray for Ray-Tracing on Mac OS X"},"content":{"rendered":"<p><a href=\"https:\/\/www.vzome.com\/blog\/2018\/02\/using-pov-ray-for-ray-tracing-on-mac-os-x\/povray\/\" rel=\"attachment wp-att-84\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"300\" src=\"https:\/\/www.vzome.com\/blog\/wp-content\/uploads\/2018\/02\/povray-300x300.png\" alt=\"\" class=\"alignnone size-medium wp-image-84\" srcset=\"https:\/\/www.vzome.com\/blog\/wp-content\/uploads\/2018\/02\/povray-300x300.png 300w, https:\/\/www.vzome.com\/blog\/wp-content\/uploads\/2018\/02\/povray-150x150.png 150w, https:\/\/www.vzome.com\/blog\/wp-content\/uploads\/2018\/02\/povray-125x125.png 125w, https:\/\/www.vzome.com\/blog\/wp-content\/uploads\/2018\/02\/povray.png 512w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Ray-traced vZome models are easy again, for Mac users!<\/p>\n<p>vZome has had POV-Ray export support for a very long time. However, at least on the Mac, POV-Ray has been getting harder to run. There is no longer a Mac desktop application, and even the command-line Mac builds have disappeared. But at its heart, POV-Ray remains a command-line tool, designed for Unix, and that means it is easy to run in a Docker container.<\/p>\n<p><a href=\"https:\/\/www.vzome.com\/blog\/2018\/02\/using-pov-ray-for-ray-tracing-on-mac-os-x\/docker\/\" rel=\"attachment wp-att-88\"><img loading=\"lazy\" decoding=\"async\" width=\"269\" height=\"201\" src=\"https:\/\/www.vzome.com\/blog\/wp-content\/uploads\/2018\/02\/docker.png\" alt=\"\" class=\"alignnone size-full wp-image-88\" \/><\/a><\/p>\n<p>Docker is a kind of virtual machine technology, and it is well supported on the Mac. If you&#8217;re willing to install <a href=\"https:\/\/docs.docker.com\/toolbox\/\" rel=\"noopener\" target=\"_blank\">Docker Toolbox<\/a>, you&#8217;ll gain the ability to run lots of command-line tools and servers. In particular, you can run POV-Ray!<\/p>\n<p>Docker Toolbox is not the latest version of Docker for the Mac, but it runs on a wider selection of machines and Mac OS X versions.  Docker Toolbox installs a &#8220;Docker Quickstart Terminal&#8221; application, and I have created a <a href=\"https:\/\/www.vzome.com\/util\/POVRay.app.zip\">customized version of that app<\/a> that makes it easy to run POV-Ray. Simply drop a vZome-generated <model>.ini file onto the POVRay app, and it will launch Terminal and run the POV-Ray &#8220;container&#8221; in Docker. (In fact, the .ini file need not be vZome-generated, as long it has enough information to supply necessary arguments to POV-Ray.)<\/p>\n<p>The first time you drop a file on it, my app will create a VirtualBox virtual Linux machine for running Docker, and it will install the POV-Ray software on it. That won&#8217;t happen again unless you lose or destroy the virtual machine.<\/p>\n<p>Since Docker Toolbox is a bit outdated, it will automatically install an older version of VirtualBox.  I found I had problems with that version, so I had to uninstall it, and install the <a href=\"https:\/\/www.virtualbox.org\/wiki\/Downloads\" rel=\"noopener\" target=\"_blank\">latest VirtualBox<\/a>.  I imagine if you do this first, then Docker Toolbox will use the one you have installed.<\/p>\n<p>My droplet app works by using AppleScript to handle the dropped file, and passes the file path to a Bash script that launches the POV-Ray container.  It should be possible to adapt this to the latest <a href=\"https:\/\/store.docker.com\/editions\/community\/docker-ce-desktop-mac\" rel=\"noopener\" target=\"_blank\">Docker for Mac<\/a>, but I don&#8217;t have that solution in hand at the moment.  I&#8217;ll update this post if I manage to get that working.\ufeff<\/p>\n<p><strong>Update<\/strong><\/p>\n<p>I have tried my POV-Ray wrapper app on a very recent version of Docker for Mac, and it works perfectly, although VirtualBox was also installed on this Mac.  I expect it will fail if VirtualBox is not present.  I still intend to provide a version of the app that will not require VirtualBox or docker-machine.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ray-traced vZome models are easy again, for Mac users! vZome has had POV-Ray export support for a very long time. However, at least on the Mac, POV-Ray has been getting harder to run. There is no longer a Mac desktop application, and even the command-line Mac builds have disappeared. But at its heart, POV-Ray remains [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-83","post","type-post","status-publish","format-standard","hentry","category-tools"],"_links":{"self":[{"href":"https:\/\/www.vzome.com\/blog\/wp-json\/wp\/v2\/posts\/83"}],"collection":[{"href":"https:\/\/www.vzome.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vzome.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vzome.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vzome.com\/blog\/wp-json\/wp\/v2\/comments?post=83"}],"version-history":[{"count":9,"href":"https:\/\/www.vzome.com\/blog\/wp-json\/wp\/v2\/posts\/83\/revisions"}],"predecessor-version":[{"id":101,"href":"https:\/\/www.vzome.com\/blog\/wp-json\/wp\/v2\/posts\/83\/revisions\/101"}],"wp:attachment":[{"href":"https:\/\/www.vzome.com\/blog\/wp-json\/wp\/v2\/media?parent=83"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vzome.com\/blog\/wp-json\/wp\/v2\/categories?post=83"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vzome.com\/blog\/wp-json\/wp\/v2\/tags?post=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}