Weighted points - Linear interpolation


How to get multiple weighted from two points?
In the image below, it is case when 1 point is calculated from two weighted points.

How to get 3 and more points from only two weighted points?
It is a question about linear interpolation of multiple points within 2 points

Interpolate Data component.

Do you mean just a regular linear interpolation? Here is a few ways. With Vector2Pt, Interpolate data, Weighted average (with lists of averages) and with Pufferfish Tween Two Points (made that one because I like interp data but liked the ability of two point inputs for different kinds of data structures).

Thanks so it is multiplication only:

   private void RunScript(Point3d v, Point3d u, double x, double y, double z, ref object A, ref object B)
    A = interpolatedPt(v, u, x * z, y * (1 - z));

 // <Custom additional code> 
 Point3d interpolatedPt (Point3d p0, Point3d p1, double w0, double w1){

Point3d origin = Point3d.Origin;
origin += p0 * w0;
origin += p1 * w1;

double item2 = 0;
item2 += w0;
item2 += w1;

return origin /= item2;


1 Like

So that is for a weighted interpolation? Pretty interesting way to go about a gradient. You could also use a graph for the other methods as well.