datavis

2015-11-25T15:35:47.000093Z

oh cool, missed the 3d printer chat, i did a bit of 3d printing of robots during my phd (have a flashforge creator these days)

2015-11-25T15:38:50.000094Z

@meow: since you’re doing single objects I’m guessing you haven’t done any stress testing on geom? happen to have seen any? i tend to do coevolutionary simulations with multi-component/mesh bodies, which is why i stick to brevis for the simulations (and stl writing even), but have been working switching over to geom for high-quality renders

meow 2015-11-25T15:46:02.000095Z

@kephale: What kind of stress testing?

meow 2015-11-25T15:46:28.000096Z

I've looked at brevis a little bit but haven't actually used it.

2015-11-25T15:47:46.000097Z

large numbers of objects being rendered at a time

2015-11-25T15:47:53.000098Z

with dynamics

meow 2015-11-25T15:48:34.000099Z

When I worked on my generative code I did some performance optimizations using criterium, and would have liked to have improved performance even more in order to sustain 60 fps for visualizing simulations.

meow 2015-11-25T15:49:32.000100Z

Then I switched to focusing on creating files for 3d printing, so I haven't been too concerned about performance.

2015-11-25T15:49:54.000101Z

hmmm, i’ll have to poke at your repos, i could use some 3d l-systems, as i need some trees for my simulations (a version of brevis was used for simulating electron microscopy, which can be used for simulating photosynthesis)

2015-11-25T15:50:48.000102Z

in a lot of ways brevis is no where near as pretty as geom from an idiomatic standpoint, but it has been more optimized for simulation than anything else i’ve run into

meow 2015-11-25T15:50:50.000103Z

Once I have the foundation in place I plan to apply the l-systems approach to the generation and manipulation of polyhedra and other complex shapes. So then performance will be an issue again.

2015-11-25T15:51:25.000104Z

oh i saw ion at one point…

meow 2015-11-25T15:52:02.000106Z

ion ergo has the l-system code

meow 2015-11-25T15:52:35.000107Z

although my focus was really on supporting all possible variations of l-systems, more than strictly performance

meow 2015-11-25T15:52:47.000108Z

I wanted to make it very easy to create the rules

2015-11-25T15:53:29.000109Z

yeah, i see that, it looks quite pleasant to write the lsystems

meow 2015-11-25T15:53:33.000110Z

also have examples here: https://github.com/decomplect/ion/tree/master/examples/ion/ergo

meow 2015-11-25T15:56:39.000112Z

My cellular automata code is also optimized to a degree, but doesn't perform as well as a one-off optimized solution as again my focus was on making it easy to define the rules in order to take these things into new directions, rather than just making yet-another-brians-brain run really fast.

meow 2015-11-25T15:57:24.000113Z

Although it does irk me that I haven't gotten as much performance out of these as I would like.

meow 2015-11-25T15:58:22.000114Z

I haven't really gotten into multi-agent simulations, but I understand the concern about performance there.

meow 2015-11-25T16:02:58.000115Z

@kephale I'm curious to see what you are rendering to stl files and how you are applying simulations to geometry.

2015-11-25T20:45:40.000116Z

@meow: it was initially tetrahedral-based l-systems in python 5/6 years ago, then hand-designed robot parts in solidworks and simulations of basic geometries that abstracted the components (i.e. not modeling screws/screw holes, etc). now the STLs are coming from multicellular simulations that are calibrated from microscopy data, and more often, meshes taken directly from the microscopy data itself

meow 2015-11-25T22:05:01.000117Z

@kephale: very interesting stuff indeed :simple_smile:

2015-11-25T22:05:31.000118Z

do you have a geom+ion repo up?

meow 2015-11-25T22:05:43.000119Z

I used python for quite a while - switched to clojure about 6 months ago

2015-11-25T22:06:39.000120Z

yeah, i was c++->(flirt with clojure)->python->clojure after lee spector convinced me and havent looked back

2015-11-25T22:07:07.000121Z

the initial flirt lost because it was in early clojure days when linking to processing was a huge mess and it was the only reasonable way to get graphics

2015-11-25T22:07:57.000122Z

but i’m seriously excited about a lsystems library, as i really would enjoy adding photosynthetic trees to simulations

2015-11-25T22:09:52.000124Z

i’d be curious how you map from the result of applying a l-system onto a mesh

meow 2015-11-25T22:17:51.000125Z

I haven't yet applied any kind of generative processing to geometry.

meow 2015-11-25T22:18:46.000126Z

When I was trying to decide where to go with my efforts I initially was going to do the turtle graphics thing but decided it had been done before.

meow 2015-11-25T22:19:51.000127Z

So had so many 2d graphics approaches. And while I'm really interested in agents and other forms of simulations, I wanted something "visual" and "concrete" and was interested in 3d printing.

meow 2015-11-25T22:20:26.000128Z

So I looked into it and found OpenSCAD and scad-clj and toyed with them.

meow 2015-11-25T22:21:11.000129Z

And while they are great, I want to really push the limits so I decided to focus more on the polygon meshes.

meow 2015-11-25T22:22:59.000130Z

So I started using http://thi.ng geom several days ago, but I also want to color the polygon faces for full-color printing and STL files can't do color so I had to read the specs on X3D so I could add that option. Just finished that a day or two ago.

meow 2015-11-25T22:24:31.000131Z

Now I can work on adding mesh operators, such as those defined by Conway https://en.wikipedia.org/wiki/Conway_polyhedron_notation

meow 2015-11-25T22:25:18.000132Z

Those will be part of the "grammar" for any l-system or automata.

meow 2015-11-25T22:26:35.000133Z

Figuring out http://thi.ng in enough detail to know whether or not it will support where I want to go has been challenging, but I'd rather not have to write my own mesh library.

meow 2015-11-25T22:28:10.000134Z

Right now all this CAD stuff is in this repo: https://github.com/pkobrien/cad

meow 2015-11-25T22:31:43.000136Z

So one thing that I'm picturing is an l-system the generates a string of commands that are mapped to mesh operators that operate on a seed polygon, just like an l-system can be mapped to turtle graphics operations.

meow 2015-11-25T22:33:31.000137Z

I'm also thinking about how polygons can be manipulated like cells in cellular automata, where the polygons attributes (like color, for example) can be determined by the state of neighboring polygons.

meow 2015-11-25T22:35:29.000138Z

And all of this should be able to be creatively combined to form creatures, sculptures, tree-like structures, whatever. And printable in full color by 3D printers. Or rendered as part of a virtual reality scene.

meow 2015-11-25T22:38:11.000139Z

@kephale: I'm spending a lot of time on creating a foundation that will support a wide range of possibilities with as few limits as possible.

meow 2015-11-25T22:39:48.000140Z

@kephale: You should also look at Karsten's Morphogen system for an example of a generative approach to mesh ops.

meow 2015-11-25T22:40:36.000141Z

https://github.com/thi-ng/morphogen

2015-11-25T22:44:05.000143Z

yeah i’ve checked it out a bit, stuff like greg hornby's 3d printable lsystem robots and stuff came from my phd lab. i am definitely still digesting the geom-based packages at the moment. for cad based ops, as you note, morphogen does seem to have a good set of operators, and i’m hoping it can be the programmatic replacement to solidworks stuff

2015-11-25T22:45:38.000144Z

just currently somewhat caught in the middle of a few different systems that have been around longer than geom, some even being in c++ (though I have clojure wrappers and such)

2015-11-25T22:47:05.000145Z

but i’m dying to see more speed tests, because i need real time simulations to be able to convince people to switch to a full clojure stack

meow 2015-11-25T22:47:42.000147Z

I never used solidworks, and haven't done any CAD stuff in ages, but it was actually Autocad circa 1985 or so that got me into computers.

2015-11-25T22:48:08.000148Z

nice!

meow 2015-11-25T22:48:57.000150Z

CAD is datavis

meow 2015-11-25T22:49:00.000151Z

:simple_smile:

2015-11-25T22:49:29.000152Z

the combination of needing to get real time simulations of meshes, brought me to @eggsyntax and @georgek ’s CLJS mathbox interface for doing 3d plotting

2015-11-25T22:50:02.000153Z

which seems like a decent enough way to get to meshes, and provide a web frontend to hide the clojure from folks who might be initially afraid

2015-11-25T22:50:18.000154Z

@meow: have you done much with the geom CLJS code?

meow 2015-11-25T22:50:59.000155Z

What I don't want to have to do is any kind of mouse manipulating. I want to generate everything pragmatically. Hence my interest in http://thi.ng and generating X3D files without using any other tool, like Meshlab or a CAD system that can't be fully automated.

2015-11-25T22:51:40.000156Z

yeah, although there is the meshlab server interface, so that might work, but i get what you’re saying (and am certainly on-board with that approach)

2015-11-25T22:52:06.000157Z

ahh, yeah input devices are kind of necessary for my ends

2015-11-25T22:53:49.000158Z

on the other hand, and possibly of interest to you, most of my mesh stuff involves images->meshes

2015-11-25T22:54:12.000159Z

which i’ve been doing in clojure (given that images are a pretty practical way to do CAs)

meow 2015-11-25T22:55:01.000161Z

do you mean have I done much with the cljs version of the http://thi.ng geom code? If so, no. I've only focused on the regular clj code so far.

meow 2015-11-25T22:55:47.000162Z

I am interested in images->meshes

2015-11-25T22:55:48.000163Z

ah yes, thats what I mean, i was just wondering how usable it is from a CLJS standpoint, i mean it does have the viz package for plotting too

2015-11-25T22:56:22.000164Z

these are always 3D images these days, so there isn’t any 2D->3D projection type of thing going on

2015-11-25T22:57:17.000165Z

~8gb images are pretty efficient to process (as compared to C++ code), so it should be plausible to handle pretty decent CA spaces

meow 2015-11-25T22:58:23.000166Z

I spent some time getting up to speed on cljs and the various reactive tools and was going to dive into om next but then when I got into the 3d printing I kind of gave up on the idea of trying to put a front-end onto any of the stuff I'm working on and just focus on using it myself to drive the output of files that can be uploaded to services like Shapeways. At least for now. And its kind of nice to not have the kinds of concerns that you are facing. :simple_smile:

2015-11-25T22:59:17.000167Z

mmm, i can survive without CLJS at the moment, but yeah the multi-agent + input interfaces are extra problems

2015-11-25T23:00:07.000168Z

i’m just kind of dancing around whether it is worth it to dive into geom for an immersion over the december holidays

2015-11-25T23:00:26.000169Z

it seems like a cure-all for any sort of visualization in clj/s

meow 2015-11-25T23:00:46.000170Z

While I'm not using http://thi.ng with cljs, it does have full support for it. And the morphogen front-end is a cljs app using maybe reagent or one of the react-based libraries.

meow 2015-11-25T23:01:20.000171Z

And Karsten definitely knows a thing or two about cljs, react, core.async, etc.

meow 2015-11-25T23:02:21.000172Z

Have you looked at the app that uses morphogen?

2015-11-25T23:03:35.000173Z

no? i’ve only read through the repo at this point

meow 2015-11-25T23:04:43.000174Z

http://devartcodefactory.com/#/select

meow 2015-11-25T23:05:31.000176Z

It isn't going to answer your question about performance because the app basically lets someone pick a seed shape and then morph it using the various operators.

2015-11-25T23:05:48.000177Z

it might hint at performance by splitting the faces a ton though!

meow 2015-11-25T23:05:51.000178Z

But it does show that cljs support is there.

meow 2015-11-25T23:06:42.000179Z

Yeah, and there might be examples in the morphogen repo as well. Or you could hit up Karsten on twitter and see what he has to say.

meow 2015-11-25T23:07:42.000180Z

I like his approach. A mesh is just a bunch of clojure data structures, like vectors and maps.

2015-11-25T23:07:50.000181Z

mmm yes, its about time for that

meow 2015-11-25T23:08:03.000182Z

And everything uses protocols and defrecords.

meow 2015-11-25T23:08:20.000183Z

So the operations are just functions going against data.

2015-11-25T23:08:21.000184Z

mmph, yes, i can appreciate that, i had issues with that in brevis when scaling up, but maybe the protocols/defrecords resolves that

2015-11-25T23:08:35.000185Z

it led to tainting it with tons of java

2015-11-25T23:09:25.000186Z

but @meow thanks much! lots of food for thought, but now I think i do need to get some into my belly

meow 2015-11-25T23:09:38.000187Z

np

meow 2015-11-25T23:09:50.000188Z

ttyl

meow 2015-11-25T23:11:26.000189Z

I suspect you'll face the same issue you have with brevis. While defrecords provide some performance improvements, they aren't a magic solution. I had the same struggle with optimizing ergo.

meow 2015-11-25T23:12:29.000190Z

But I'm far from an expert when it comes to optimizing clojure.