Apply Vector Field

https://github.com/nortikin/sverchok/assets/14288520/33c5d489-170a-48b1-9d8f-e091ca4877ec

Functionality

This node applies the Vector Field to provided points. More precisely, given the vector field VF (which is a function from points to vectors) and a point X, it calculates new point as X + K * VF(X).

This node can also apply the field iteratively, by calculating X + K*VF(X) + K*VF(X + K*VF(X)) + …. In other words, it can apply the field to the result of the first application, and repeat that several times.

https://github.com/nortikin/sverchok/assets/14288520/a3cf2027-53b1-4077-9b59-b2cd1dec0e8b

Inputs

This node has the following inputs:

  • Field. The vector field to be applied. This input is mandatory.

  • Vertices. The points to which the field is to be applied. The default value is (0, 0, 0).

  • Coefficient. The vector field application coefficient. The default value is 1.0.

  • Iterations. Number of vector field application iterations. For example, 2 will mean that the node returns the result of field application to the result of first application. The default value is 1.

Parameters

  • Output NumPy. Outputs NumPy arrays in stead of regular python lists. Improves performance

Outputs

This node has the following output:

  • Vertices. The result of the vector field application to the original points.

Performance Notes

This node works faster when the vertices list are NumPy arrays

Examples of usage

Example of Description:

https://github.com/nortikin/sverchok/assets/14288520/dde29284-518a-40ad-8e12-84a043037bbe https://github.com/nortikin/sverchok/assets/14288520/694fb6d9-6de6-42f5-9db3-aff214bb1c20

Apply noise vector field to the points of straight line segment:

https://user-images.githubusercontent.com/284644/79487691-15c25980-8032-11ea-93e9-51f9b54bd36e.png

Apply the same field to the same points, by only by a small amount; then apply the same field to the resulting points, and repeat that 10 times:

https://user-images.githubusercontent.com/284644/79487987-7b164a80-8032-11ea-8197-c78314843ffa.png