Re: [ClojureScript] [ANN] thi.ng collection update (CLJ/CLJS)

2015-03-13 Thread Karsten Schmidt
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  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  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  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 
> 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 

Re: [ClojureScript] [ANN] thi.ng collection update (CLJ/CLJS)

2015-03-12 Thread kovas boguta
On Thu, Mar 12, 2015 at 8:18 PM, kovas boguta 
wrote:

>
> 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.
>

To clarify, I want to turn the cuboid into a mesh, and then do the
tessellation of the mesh. Tessellating the cuboid directly gives me the
faces in an obvious predictable order. However I want the mesh b/c theres
other computations I want to perform with it.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ClojureScript] [ANN] thi.ng collection update (CLJ/CLJS)

2015-03-12 Thread kovas boguta
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  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  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  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 
> 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

Re: [ClojureScript] [ANN] thi.ng collection update (CLJ/CLJS)

2015-02-25 Thread Karsten Schmidt
This draft anim was created for The ODI and shows 2 years (summer
2011-2013) worth of London knife crime (based on open data ambulance &
A&E reports):

http://media.thi.ng/2013/odi/20131029-heatmap-draft-1280x960.mp4

On 26 February 2015 at 00:42, Dylan Butman  wrote:
> I totally thought that map was a photo of 3d printed shapes, but it makes
> sense that you're using luxrender now. Is there a video of the animation
> online somewhere?
>
> On Wed Feb 25 2015 at 6:13:25 PM Karsten Schmidt  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  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  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 
>> > 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 co

Re: [ClojureScript] [ANN] thi.ng collection update (CLJ/CLJS)

2015-02-25 Thread Dylan Butman
I totally thought that map was a photo of 3d printed shapes, but it makes
sense that you're using luxrender now. Is there a video of the animation
online somewhere?

On Wed Feb 25 2015 at 6:13:25 PM Karsten Schmidt  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  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  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 
> 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
> >

Re: [ClojureScript] [ANN] thi.ng collection update (CLJ/CLJS)

2015-02-25 Thread Karsten Schmidt
Computational design = using computational approaches to design
problems, for anything from analysis, implementation to
representation...

CSG is indeed only for meshes since it's based on BSP partitioning and
because of that also has a few edge cases (due to float precision)
where it breaks down and can cause small holes to appear (but these
can be fixed with Meshlab/Blender etc). Does OpenSCAD *not* use
tessellated geometry for boolean ops? I always was under the
impression it does too... need to double check! The other way to do it
(and actually easier) is via voxels. There's a really old iso surface
implementation in [1], but that needs a complete rewrite and is
therefore not bundled with any current releases...

Again, I wish there would be more activity in Clojureland underway in
these non-web-tech related fields (we have dozens of server & dom
libs, but not that much for design, modelling, architecture,
fabrication). That's not trying to be defensive in any way, but a
single person can only do that much and all the features & tools
provided so far were purely developed on a need to have basis
(obviously with a priority to be as re-usable as possible).

Hth! K.

On 25 February 2015 at 23:21, Jason Felice  wrote:
> So... what is "computational design"?
>
> I've been using OpenSCAD to make models for 3D printing, and I keep wishing
> for a Clojure syntax and real functions and things.  Is this it?
>
> (It doesn't seem to have constructive solid geometry for things which aren't
> meshes.)
>
> -Jason
>
> On Wed, Feb 25, 2015 at 4:13 PM, Karsten Schmidt  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  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  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 
>> > 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 ~5

Re: [ClojureScript] [ANN] thi.ng collection update (CLJ/CLJS)

2015-02-25 Thread Jason Felice
So... what is "computational design"?

I've been using OpenSCAD to make models for 3D printing, and I keep wishing
for a Clojure syntax and real functions and things.  Is this it?

(It doesn't seem to have constructive solid geometry for things which
aren't meshes.)

-Jason

On Wed, Feb 25, 2015 at 4:13 PM, Karsten Schmidt  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  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  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 
> 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

Re: [ClojureScript] [ANN] thi.ng collection update (CLJ/CLJS)

2015-02-25 Thread Karsten Schmidt
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  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  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  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 + r

Re: [ClojureScript] [ANN] thi.ng collection update (CLJ/CLJS)

2015-02-25 Thread Bruce Durling
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  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 clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.