Thanks! On Fri, Mar 13, 2015 at 8:28 AM, Karsten Schmidt <[email protected]> wrote:
> Hi Kovas, so far the mesh types (GMesh & BasicMesh) were mainly used for > 3d printing rather than viz purposes and have not yet support for vertex or > face attributes. It is something I still need to port over from the > previous version of the lib. I held off on that so far to first let the > WebGL conversion parts settle (almost done) and will address this in the > next month. The aim is to provide an attribute structure allowing any type > of attribute along with serializers for common attribs (UVs, colors, IDs) > for WebGL and provide hooks to interpolate attribs (e.g. for subdivisions). > Ultimately this might even become available for other types too, i.e. > directly on the cuboid, aabb, lines etc. > > As for the current state: I've created a gist showing how this can be > achieved currently, in principle: > > https://gist.github.com/postspectacular/894fc58d75005069a546 > > Thanks for the feedback, as always highly appreciated! > > K. > Hi Karsten, > > Technical usage question. > > I want to associate a color to each face of a cuboid, tesselate the > cuboid, and end up with an array of vertices and an array of matching > colors. > > My problem is associating the colors of the cuboid faces to their > tessellated versions. AFAICT tessellation simply produces new faces and > does not have facilities for propagating annotations from the old face to > the new faces. Furthermore, because the faces are stored in an unordered > set, it is not possible to somehow match the new faces to the old ones > based on ordering, at least in this simple case. > > I tried to work around this by supplying the face set as an empty vector > to the mesh constructor. Unfortunately this doesn't work because the > creation of the new mesh simply calls the default constructor function, so > the new faces end up getting poured into a set anyway. > > If instead, it called (empty) on the faces of the supplied mesh, this > workaround could work. However it is brittle, requiring to one know ahead > of time how many new faces will be generated for each input face. > > Is there a better way to do this? > > Thanks! > > > > > > > > > > > > > > > > > > > On Wed, Feb 25, 2015 at 6:13 PM, Karsten Schmidt <[email protected]> wrote: > >> That's a good point, Bruce! To be honest, I don't know anymore, but it >> makes complete sense to change it. Consider it done! :) >> >> As for your mapping question, yes, of course! I've done a few of them. >> E.g. the first pic on the website [1] was a project for The ODI in >> 2013 and is a map of different council/borough stats of London (here >> knife crime). The shape files were first retrieved & processed with >> the thi.ng/trio lib directly from the UK statistics office's SPARQL >> endpoint [2], then projected to Mercator, converted to 2d polygons, >> smoothed them and then extruded as 3D walled meshes and exported as >> STL files using geom. To create that rendered image, another function >> then combined all borough meshes into a complete render scene for >> Luxrender (using the luxor lib). Since this all was for a 60sec >> animation, I also wrote the tweeny lib for that project to allow me to >> define the timeline for the various camera, mesh, light & shader >> changes. The whole bundle was then sent to EC2 and rendered on 340+ >> CPUs... basically, spawned a private render farm. >> >> Alternatively with < 30 lines of code you could query any UK >> constituency (or use similar endpoints for other countries), do those >> initial shape transformations and send the resulting STL mesh file >> straight to a 3D printer... For online use, of course the SVG or WebGL >> modules would be more interesting, but these really would just deal >> with that last transformation/visualization step, i.e. turning a >> thi.ng.geom.Polygon2 into an SVG <polygon> node or tesselate it and >> stuff it into WebGL buffer to display... >> >> For more flexible mapping, it'd be great to port some/all of the >> projections from [3] in its own clj lib for easier (and non-JS >> related) access... >> >> [1] http://thi.ng/img/04.jpg >> [2] http://statistics.data.gov.uk/doc/statistical-geography >> [3] https://github.com/d3/d3-geo-projection/ >> >> Hth! >> >> On 25 February 2015 at 22:34, Bruce Durling <[email protected]> wrote: >> > Karsten, >> > >> > Is there a reason why you went with a README.md and then an index.org >> > rather than a plain README.org? >> > >> > (love all the rest of it and loved your use of it at The Barbican. I >> > need to get my head around it all. I'm wondering if I can use it for >> > some of the geographic and other charting things I do a lot of). >> > >> > cheers, >> > Bruce >> > >> > On Wed, Feb 25, 2015 at 5:06 AM, Karsten Schmidt <[email protected]> >> wrote: >> >> Hi guys, >> >> >> >> thi.ng is a collection of over a dozen largely x-platform Clojure & >> >> Clojurescript libs for computational/generative design & data >> >> visualization tasks. >> >> >> >> I just wanted to give a little heads up that this project has recently >> >> seen a number of releases and, as a whole, by now is generally quite >> >> stable and usable (*is used*) for realworld projects (although most >> >> libs remain in constant parallel development to make them more feature >> >> complete). I've collated a number of images of projects and links to >> >> the most important libs here: >> >> >> >> http://thi.ng/ >> >> >> >> Most notably of those: >> >> >> >> http://thi.ng/geom >> >> By far the largest sub-project and backbone for most others: A 2D/3D >> >> geometry package w/ comprehensive vector algebra, swizzling, >> >> intersections, matrix types & helpers, quaternions, pure shape >> >> primitives with ~50 protocols for polymorphic enquiry & manipulation, >> >> meshes (incl. I/O), mesh subdivisions, CSG mesh ops, Verlet physics >> >> engine (only particles, springs, behaviors)... Most of this lib is >> >> pure geometry w/ no rendering specifics, although there're separate >> >> modules for SVG rendering w/ shader support & decorators [1], WebGL >> >> wrapper and converters from shapes/meshes to VBOs and various shader >> >> presets/utils. >> >> >> >> http://thi.ng/shadergraph >> >> GLSL (WebGL) pure function library & dependency graph (based on >> >> com.stuartsierra/dependency), GLSL minification during CLJS compile >> >> time >> >> >> >> http://thi.ng/color >> >> RGB, HSV, CMYK, CSS conversions, color presets (incl. D3 category >> schemes) >> >> >> >> http://thi.ng/luxor >> >> Complete scene compiler DSL for http://luxrender.net, based around >> thi.ng/geom >> >> >> >> http://thi.ng/morphogen >> >> Declarative 3D form evolution through tree-based transformations, >> >> basically an AST generator of geometric operations to transform a >> >> single seed node into complex 3D objects >> >> >> >> http://thi.ng/tweeny >> >> Interpolation of nested (presumably animation related) data >> >> structures. Allows tweening of deeply nested maps/vectors with >> >> completely flexible tween fns/targets and hence easy definition of >> >> complex timelines >> >> >> >> http://thi.ng/validate >> >> Purely functional, composable data validation & optional corrections >> >> for nested data. Supports both maps & vectors, wildcards, comes with >> >> many predefined validators, but extensible... >> >> >> >> http://thi.ng/trio >> >> A generic, non-RDF specific triple store API and feature rich >> >> SPARQL-like query engine >> >> (and my prime example of using the literate programming approach with >> >> org-mode[2][3]) >> >> >> >> Last but not least: Super special thanks are due to the following >> people: >> >> >> >> Rich, Alex + rest of clojure.core >> >> David (+everyone else involved) for the immense effort on making CLJS >> >> proper useful, >> >> Chas, Kevin and anyone else working on CLJX... >> >> none of this would have been possible without these amazing tools! >> >> >> >> Best, K. >> >> >> >> Ps. There're a number of other libs in this collection which are in >> >> dire need of updating (last touched spring 2013) - these are related >> >> to general OpenCL functionality and voxel rendering. Some of the >> >> example images on the above site were created with these... >> >> >> >> [1] >> https://github.com/thi-ng/geom/blob/master/geom-svg/src/examples.org >> >> [2] https://github.com/thi-ng/trio/blob/master/src/query.org >> >> [3] http://orgmode.org/ >> >> >> >> -- >> >> Karsten Schmidt >> >> http://postspectacular.com | http://thi.ng/ >> >> >> >> -- >> >> Note that posts from new members are moderated - please be patient >> with your first post. >> >> --- >> >> You received this message because you are subscribed to the Google >> Groups "ClojureScript" group. >> >> To unsubscribe from this group and stop receiving emails from it, send >> an email to [email protected]. >> >> To post to this group, send email to [email protected]. >> >> Visit this group at http://groups.google.com/group/clojurescript. >> > >> > -- >> > Note that posts from new members are moderated - please be patient with >> your first post. >> > --- >> > You received this message because you are subscribed to the Google >> Groups "ClojureScript" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> an email to [email protected]. >> > To post to this group, send email to [email protected]. >> > Visit this group at http://groups.google.com/group/clojurescript. >> >> >> >> -- >> Karsten Schmidt >> http://postspectacular.com | http://toxiclibs.org | http://toxi.co.uk >> >> -- >> Note that posts from new members are moderated - please be patient with >> your first post. >> --- >> You received this message because you are subscribed to the Google Groups >> "ClojureScript" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/clojurescript. >> > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
