{"id":9,"date":"2012-04-22T17:33:06","date_gmt":"2012-04-22T17:33:06","guid":{"rendered":"http:\/\/www.dannywynne.com\/blog\/?p=9"},"modified":"2012-06-05T14:33:31","modified_gmt":"2012-06-05T14:33:31","slug":"voronoi-in-maya-with-qhull","status":"publish","type":"post","link":"http:\/\/www.dannywynne.com\/blog\/?p=9","title":{"rendered":"Voronoi in Maya with Qhull"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/dannywynne.com\/images\/voronoi.jpg\" alt=\"voronoi\" \/><br \/>\n<br \/>\nVoronoi diagrams are cool, and it sucks that they aren&#8217;t in Maya. I wrote this wrapper around Qhull to create 3d voronoi diagrams. Just select a bunch of locators and run the script. <\/p>\n<p>first you need to download Qhull at <a href=\"http:\/\/http:\/\/www.qhull.org\/\" title=\"http:\/\/www.qhull.org\/\">www.qhull.org<\/a><\/p>\n<p>download my script <a href=\"http:\/\/dannywynne.com\/scripts\/dw_qvoronoi.zip\" title=\"dw_qvoronoi\">here<\/a><\/p>\n<p>run the script below in a python tab. Replace the directories with the bin&#8217;s directory from your Qhull download, and provide another temporary directory to dump the text files that Qhull creates<br \/>\n[python]<br \/>\nimport dw_qvoronoi<br \/>\ndw_qvoronoi.main(<br \/>\n\tqhull_dir = r&#8221;C:\\Users\\Danny\\Documents\\qhull\\bin&#8221;,<br \/>\n\ttmp_dir = r&#8221;C:\\Users\\Danny\\Documents\\qhull\\tmp&#8221;<br \/>\n\t)<\/p>\n<p>[\/python]<br \/>\nthe script will not clean up the temporary directory for safety reasons. I don&#8217;t want someone to delete an important directory. So just remember to clean it out each time you use it or add that functionality yourself. <\/p>\n<p>I plan on exploring the Qhull c++ interface at some point to make it much faster. And I&#8217;d like to make a slick interface.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Voronoi diagrams are cool, and it sucks that they aren&#8217;t in Maya. I wrote this wrapper around Qhull to create 3d voronoi diagrams. Just select a bunch of locators and run the script. first you need to download Qhull at www.qhull.org download my script here run the script below in a python tab. Replace the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[3,5,7],"class_list":["post-9","post","type-post","status-publish","format-standard","hentry","category-maya-scripting","tag-maya","tag-python","tag-qhull"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.dannywynne.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.dannywynne.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.dannywynne.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.dannywynne.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.dannywynne.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9"}],"version-history":[{"count":0,"href":"http:\/\/www.dannywynne.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.dannywynne.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.dannywynne.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.dannywynne.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}