Hello
I am not sure on your assumption. In a vector field magnitude could give acceleration, velocity, position to a particle. But you don’t really follow magnitude, except if you have something like a Drag… Also as you choose vector to be the axis of a plane, Magnitude is always 1 !
What I can advise you is to make a Vector Field using you points and vectors.
Here I use a component from Nautilus (next release) that make an interpolation using Invers Distance Weighting
Then using this field you can use Legacy component from Grasshopper to draw the streamlines. I uses 2 directions of vector to have the 2 sides of streamline.
For SPM, I used to have it but I didn’t manage to install it on Rh8 !
Here the derived class I use for the field
public sealed class InverseDistanceWeightingField : GH_FieldElement
{
List<Point3d> lst_pts;
List<Vector3d> lst_vectors;
double power;
public InverseDistanceWeightingField(List<Point3d> arg_lst_pts, List<Vector3d> arg_lst_vectors, double arg_power)
{
lst_pts = arg_lst_pts;
lst_vectors = arg_lst_vectors;
power = arg_power;
if (arg_lst_pts.Count != arg_lst_vectors.Count) throw new Exception("FieldFromVectors number of points must be the same as number of vectors");
}
public override Guid ElementGuid
{
get { return Guid.NewGuid(); }
}
public override BoundingBox BoundingBox
{
get { return new BoundingBox(new Point3d(-10,-10,-10), new Point3d(10,10,10)); }
}
public override IGH_FieldElement Duplicate()
{
return new InverseDistanceWeightingField(lst_pts, lst_vectors, power);
}
public override Vector3d Force(Point3d pt)
{
return LDLIB.InverseDistanceWeighting.InverseDistanceWeighting_Vectors(lst_pts, lst_vectors, power, pt);
}
}
In Nautilus there is a component that can clean the curves and suppress curves too close from each other.
Perhaps it could be better to have the Zero vector in the other points of the grid ! This could improve the interpolation ?
And yes with some limitation of the points for interpolations, it is better




