Grasshopper

generative modeling for Rhino

# Rheotomic surfaces and flowline generation tool

Around 3 years ago I wrote an essay on my blog about what I called rheotomic surfaces - a type of surface I had developed related to fluid flow and electrostatics, and a technique for their generation using complex numbers.

Since then I have received a lot of questions from people interested in the details of exactly how these surfaces and their associated curvilinear orthogonal grids were generated.

Now I've packaged it up into a Grasshopper object with an easy interface, and am releasing it publicly so anyone can experiment with this tool.

(See this video for an example of it in action)

When the idea of using the streamlines of a flow to generate a surface first occurred to me, I thought the way to go about this would be to integrate a 2d vector field from various seed points and then move these lines vertically and loft between them - but after a lot of head scratching and experimentation, I was amazed to discover that it is actually possible to skip that step altogether.

In this technique, the surface is generated first, by moving the points of a mesh vertically from the complex plane according to the scalar values of their real and imaginary components, to generate 2 separate meshes. One of these meshes gives the rheotomic surfaces described in my essay, with helicoid shaped regions near the sources and sinks, and its contours are the streamlines of the flow (hence the name). The other mesh has sharp funnel shaped regions, and its contours give the equipotentials of the flow, orthogonal to the streamlines.

One of the advantages this technique has over vector field integration methods is that there is no problem of choosing seed points for streamline placement, and nice even spacing happens automatically. We also avoid the difficulties with cumulative error common to such methods.

By multiplying by other complex factors it is also possible to generate lines at specific angles to the streamline/equipotential directions and create various grid types.

Also because of the mesh contouring technique, these are actual vector curves being created, not just pixel based mappings.

Because the complex logarithm function is multivalued, dealing with the mesh in a way that avoids a sudden jump at the branch cuts does require a bit of special treatment, and it is not quite a straightforward height map, but I found that it is possible to avoid the usual techniques for contouring a 3d scalar field.

This definition outputs both the curves and the meshes. The meshes produced are singly periodic - you can make copies vertically shifted by 2*Pi to get a continuously spiralling surface, and if you also shift them by 1*Pi you get the other half of the helicoids, and it can all be joined into a complete and smooth surface.

So enjoy, I hope you find some interesting and original ways of using and developing this. Please do remember to attribute properly - a lot of effort has gone into this, but I'm freely sharing it in the hope that will be respected.

I've chosen not to compile or obfuscate anything, so you can easily pull it apart and see how it is all working. The original essay linked to at the start contains some suggestions of further reading if you want to learn more about complex numbers and flows.

The file: Rheotomic_Surfaces.gh

Views: 9022

Comment

Join Grasshopper

Comment by Anna B on November 23, 2012 at 11:26am

Oh wait! it works, but only with the "square" setting. This is great! Out of curiousity, could you describe why the square one works as opposed to the others? This is really fun algorithm to explore.

Comment by Anna B on November 23, 2012 at 11:19am

I did try both the indices that represent the two different meshes, but both of the meshes have branch cuts in this case, and I still get the error "The Ucount is not valid for this amount of points". Is it possible that you could upload the exact gh file you're working off of?

Comment by Daniel Piker on November 23, 2012 at 10:54am

sorry - forgot to show all the inputs:

Comment by Anna B on November 23, 2012 at 9:47am

Thanks for the reply Daniel. I've tried reproducing your screencapture but not with the same result...

As you can see, the surface that I have is a "broken up" kind as opposed to the continuous one you showed in your first reply. You mention shifting by 1*Pi to get a continuous surface... is that what I'm missing? In that case, where would I apply this shift?

Also, what expression are you using for the Ucount of the surface grid?

Comment by Daniel Piker on November 23, 2012 at 9:20am

also, maybe these videos make it clearer:

Comment by Daniel Piker on November 23, 2012 at 9:03am

Hi Anna,

I think perhaps I didn't illustrate enough in my post above that the definition actually already generates the rheotomic surfaces, as well as the curves. In fact the surfaces are generated first, and the curves are the sections of these surfaces.

So one family of the curves always exists as the sections of the surface, and the other curve families can easily be projected onto it like this:

Comment by Anna B on November 23, 2012 at 8:42am

I've also been trying to achieve a surface similar (or exactly...) to panhao, using the rheotomic surfaces definition as a starting point to work. But I can't seem to figure out how to do it! I've been thinking of it as trying to project the flattened lines of flow onto a shaped surface, but so far I can't even generate the appropriate surface to project onto (which would be based off of the sources/sinks as attractor points for distorting the surface). help?

Comment by nicky on August 5, 2012 at 11:54am

hi panhao..i like your photos..can you share me this defination.thank you

Comment by nicky on August 5, 2012 at 11:50am

I am amazed U use so many component to build these curves. I translated some processing code and produced something similar to Ur work：

hey guy..can you share me this difination..i love it..thank you..

email: bosua000@yahoo.com

Comment by the status Kuo on July 7, 2012 at 1:14am

this is great!

by Alex

by Alex

by Alex

• View All