This is great! There is, however, one potential issue with this implementation stated here:<p>"<i>Faces are sorted back-to-front in a very approximate way according to the Z centroid</i>".<p>In certain cases, this can lead to showing the back face and hiding the front face because the centroid position is not sufficient for figuring out the Z order of triangles.<p>Other than this minor issue, it's a great implementation.
Awesome work!<p>I ran the 4 shape example through SVGOMG and lowered the precision slider down until it didn't affect the perceived output.<p>The result was about 40% of the original size.<p><a href="https://jakearchibald.github.io/svgomg/" rel="nofollow">https://jakearchibald.github.io/svgomg/</a><p>SVG tested:<p><a href="https://camo.githubusercontent.com/ffa6eed9348fcd42454fc3916f7662bc0f9808a6/68747470733a2f2f70726964656f75742e6e65742f626c6f672f7376675f776972656672616d65732f66696c6d73747269702e737667" rel="nofollow">https://camo.githubusercontent.com/ffa6eed9348fcd42454fc3916...</a><p>Side note -- if using React, svg2jsx is great for converting the SVG properties to React JSX names.<p><a href="https://svg2jsx.herokuapp.com/" rel="nofollow">https://svg2jsx.herokuapp.com/</a>
Very nice! This reminds me a bit of Michael Fogleman's 3D Line Art Engine [0]. His project was motivated by a desire to make vector art for a pen plotter, so not quite the same goals. I appreciate how you've woven together images, code, and explanatory text in this post.<p>[0] <a href="https://github.com/fogleman/ln" rel="nofollow">https://github.com/fogleman/ln</a>
I wish I could find it, but a while back there was a post about a web-based vector renderer for 3D objects, possibly a three.js plugin. It has some really nice looking demos.<p>I don't think it was seen.io, but seen.io appears to do something similar to this post, in JS: <a href="http://seenjs.io/" rel="nofollow">http://seenjs.io/</a>
Outstanding documentation quality - simple descriptions of the context, problem and solution, at increasing levels of specificity. Other people should learn from this when writing their own Readmes.
I have thought about doing something similar for PDF reports in a CAE app. Concluded it won’t scale. I need to handle high-poly meshes, 1M vertices and more. That’s why instead I’m using 600DPI jpeg images, rendered on GPU.<p>But when you know the mesh is low-poly, the technique is really cool. It should be trivial to port from Python to any other language, also from SVG to e.g. PDF.
This seems useful for SIGGRAPH paper graphics.<p>BTW I always think this website is something to do with being Out and Pride. That is my default parsing no matter how many times I've seen cool stuff on this website and the great stuff that Philip does.