<div dir="ltr"><div><div><div><div>You might wonder what this has to do with Python, see notes at the end for a pure Python code stash. <br><br>We also tend to think of the Raspberry Pi as a "Python computer" so anything Raspbian is of potential interest. Antiprism will convert OFF (geometry) files to POV (ray tracing) files.<br><br></div><div>The Python + POV-ray synergy is still viable, though I've not attempted that. Looks like my next project, following the recipe here:<br><br><a href="https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=100529">https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=100529</a><br></div><div><br></div><div>In the meantime, lets do a workout using basic development tools:<br></div><div><br>Unzip Adrian's tar.gz file from <a href="http://antiprism.com" target="_blank">antiprism.com</a> or clone his Github repository, and then install a GLUT clone if you don't already have one (the configure step will say it can't build antiview if you don't).<br><br><div><span style="font-family:monospace,monospace"><font face="monospace, monospace">sudo apt-get install freeglut3-dev g++<br><br></font></span><span style="font-family:arial,helvetica,sans-serif">Then configure / compile / install:</span><span style="font-family:monospace,monospace"><font face="monospace, monospace"><br><br></font>CPPFLAGS="-fsigned-char" ./configure</span></div><div><span style="font-family:monospace,monospace">make</span></div><div><span style="font-family:monospace,monospace">sudo <span style="color:rgb(0,0,0);white-space:pre-wrap">make install-strip</span></span></div><div><div><span style="font-family:monospace,monospace">sudo ldconfig</span></div></div><br></div>Read the docs and look at the many screen shots on his website for what you'll be able to do after that. <br><br>In my case the Pi may simply generate OFF files, transform them into POV files, then offload to another machine for actual rendering.<br><br></div><div>Screen shots:<br><br><a href="https://flic.kr/p/Ln3zeL">https://flic.kr/p/Ln3zeL</a><br><br><a href="https://flic.kr/p/Lom9uH">https://flic.kr/p/Lom9uH</a><br><br></div><div>Notes: <br><br>I started with a plain vanilla Jessie distro of Raspbian.<br><br></div><div>The steps above, including the need to maybe run ldconfig are spelled out in Adrian's README, which I suggest you go to first thing, if undertaking this cooking exercise.<br><br></div><div>For math teachers new to "gnu math": some of the steps in the above recipe take quite awhile, starting with that very first process: getting a free OpenGL implementation.<br><br>I went out and did yard and gardening work during the make step. Partake of some school-approved beverage and kick back.<br><br>During ./configure, the script may appear to hang at some point at:<br><br></div><div>fi<br><br></div><div>(the end of a bash script if block i.e. if .... fi marks a block) and you'll maybe wonder if it's up to you to perform an intervention. Have faith, the script will say done when it's finished.<br><br></div><div>The <span style="font-family:monospace,monospace">CPPFLAGS="-fsigned-char" </span>relates to this issue:<br><br>
<a href="http://blog.cdleary.com/2012/11/arm-chars-are-unsigned-by-default/" rel="noreferrer" target="_blank">http://blog.cdleary.com/2012/<wbr>11/arm-chars-are-unsigned-by-d<wbr>efault/</a><br>
<br></div><div>Adrian diagnosed the issue only hours ago. Without that switch, it'll compile, and all the --help switches will work, but the many programs will report a command line error and not actually do the work.<br><br>Adrian was able to grok the problem even without owning a Pi. He used this emulator instead:<br><br> <a href="https://wiki.debian.org/RaspberryPi/qemu-user-static" rel="noreferrer" target="_blank">https://wiki.debian.org/Raspb<wbr>erryPi/qemu-user-static</a><br>
<br>Many thanks to Adrian Rossiter for this brilliant and well-maintained spatial geometry library. <br><br>He also has a large stash of free Python programs that cover some of this same territory:<br><br><a href="https://github.com/antiprism/antiprism_python/blob/master/README.md">https://github.com/antiprism/antiprism_python/blob/master/README.md</a><br></div><div><br></div>Kirby Urner<br></div><div>@4DsolutionsPDX<br><br></div><div>Portland Knowledge Lab VLM (a type of PWS) in Portland, Oregon<br></div></div><div><div><br></div></div></div>