Wind Flow Map to vectors or curves

Hello

I would like to create wind flow map as it is on attached images. I will use that kind of map to extract direction vectors and possibly also density of flow (if possible). I will use that data to rule my design of wine bottles wall - as seen on attached picture.

My idea is to create somehow “path curves” and interpolate its direction through desired field. Or maybe points with vectors? I played with vector fields (point charge) and tried to tween multiple curves, even tried “culebra” plugin. But without any satisfaction. The closest I got was when using culebra.

I would be glad for any ideas that could help me finding the solution.

Thanks!

UPDATE: It seems that I cracked the challange. At the end - no plugin required (just enriched graph mapper, but also works with the original one, just needs to remap numbers first). I also wrote simple python script to get field lines.

It still has stomthing to improve, but I am already satisfied with the result. And it’s light code with minimum elements. I will update this post as soon as I manage to improve the script.

4 Likes

Now even with vector field smoothing and path curve smoothing… :smile:

5 Likes

Hi @PetrVacek,

The result of the script looks very good. I’m currently tryin to do the same, but it’s not working out quite well. Would you be so kind to share the script with us?

Thanks. I will try to search for the script as it’s been already a while ago. What do You use it for and how is Your approach so far? I am just curious.

Is this what you want field flow.gh (11.3 KB)

i used flowL

1 Like

FlowL was not really matching my expectations so I wrote my own script that I share right now.

There are many parameters influencing the result. What is needed is point field and ruling curves. Try to play with those parameters to get the best result. And please share to this topic so everyone can contribute to the result. I found very important to change domain start parameter at “enriched graph mapper” component.

Also, there are two smoothing possibilities. Disclaimer: I am not professional coder, so Python script might be written in a bad way, but so far it works :slight_smile:

petrvacek_vector_field.gh (23.4 KB)

7 Likes

Thanks for sharing, nice work.


5 Likes

Hi @PetrVacek, thanks for sharing your python script any implementation for 3d analysis? how about taking the advantage of the Field Line by using custom fields, this is an old example from @DavidRutten, I don’t know if it is possible to work with a list of vectors like your code, It would be awesome…
(Drainage flow is just an example of the potential of using independent vectors as a field)


simpledrainage_te.gh (92.6 KB)

have you seen this?

2 Likes

You can also check this Fluid simulation kangaroo

yeah, I took that example mesh but the point of the discussion is to get field lines from a set of vectors as a guide (attractors, stress lines, whatever)

Nice colours. What does it represent? Some sort of “curvature”?

Hello. Interesting. It actually should work in 3D as well, but I am not sure. Can You describe this idea more, please?

very interesting video, you posted there; Do you have any more information on that? I tried to come up with something simmilar once: Discretizations of vectorfield in equidistant curves / aligned stripe pattern but the performance was not that great.

Would love to find out how you did it.

Yes it is a sort of curvature
Distance between middle point and line between extreme points

Hi @PetrVacek Indeed work in 3D, but I mean adding a mesh as an input to find the mesh closestpoint inside your recursion to be more accurate. How about the other example why doesn’t work? I used DanielPiker mesh principal curvature.


vectorfields.gh (210.1 KB)

Maybe via Kangaroo could be another way to generate field lines with vectors and some align and vector interpolation to generate the most precise flow Mr. @DanielPiker?

Hi @DavidRutten Does a custom
Grasshopper.Kernel.Types.GH_Field
could work with a set of vectors in order to use Field Line?

Hi @Konrad.Kobayashi Yeah! you need something similar. I think first you need to generate the principal field polylines(This discussion for that). Then, adjust with Kangaroo collider for the equidistant, and Finally, you need to generate additional field lines to cover all your mesh with some recursion method… The approach of the video is not my work is from @suryanshchandra.

Hello. I am working on that script after quite a long time. Trying to rewrite to C# only, but as a coder beginner, I am having hard times :nerd_face: Here are some WIP examples. Now it doesn’t require field of points like the first approach and it’s even faster. It has better but still not good approximation and smoothing of vector field.

1) dense wind trails / given start points / works in 2D & 3D

2) wind trails without intersections / given start points / works in 2D & 3D

3) random population within closed curve / 2D only

1 Like

…a few hundreds lines of code later…

2 Likes