Vector Field Smoothing

Hello,

I have a list / field of vectors in grasshopper but i have some runaways (top left).
My question is now, is there a possibillity to smooth these vectors to get a result without vectors facing in a completely different direction and get a smooth transition.

Based on this vectors i want to do a pathplanning in a subsequent step.

Thank you very much in advance!

Kind regards
Raphael

Yes, see:

Here’s an example with simple vector field smoothing
vsmooth_00000

vectorsmooth.gh (13.4 KB)

4 Likes

Hello
as a vector is 2 or 3 numeric values, it is also possible to smooth the weights from each axis and then combine it.
Here Borders are not fixed


smooth vectors.gh (7.9 KB)

Will need Nautilus plugin

Test with the same data as Daniel, Slightly different but similar looking

2 Likes

Hi Daniel, your Gif is very light, which tool are your using ? I still use
//Animated gif maker script - Daniel Piker 24/03/2016
//Using code from NGif: NGif, Animated GIF Encoder for .NET - CodeProject
Have you something newer ?

Yes, the encoder in that old script makes rather large files.
I usually render out the frames from Grasshopper then make them into a gif with an external program. For basic stuff I still use VirtualDub for this.

To create gifs and videos directly from Grasshopper there’s also Tapeworm:

1 Like

Thanks for the answer, I’ll try that. It will also help me for Instagram that doesn’t use GIF.

Thank you guys for your fast replies!

I face the following problem:
The vectors i got are associated with the faces. Your scripts assume that the vectors are assigned to the vertecies. In other words, I have too few vectors than I actually need.
Would you know a solution?

This should do it - added a script to take a set of values per face and get values per vert.
face_to_vert.gh (16.0 KB)

2 Likes