Function Repository Resource:

# BlendLine

Blend between lines

Contributed by: Sander Huisman
 ResourceFunction["BlendLine"][{line1,line2}] gives the line halfway between line1 and line2. ResourceFunction["BlendLine"][{line1,line2},α] gives the line a fraction α between line1 and line2. ResourceFunction["BlendLine"][{line1,line2,…},α] gives the line a fraction α between lines linei. ResourceFunction["BlendLine"][{line1,line2,…},{α1,α2,…}] gives several lines with fractions αi.

## Details and Options

Line objects line1 and line2 should contain a single line.
Line objects line1 and line2 can be in any dimension.

## Examples

### Basic Examples (2)

Interpolate halfway between two lines:

 In[1]:=
 Out[1]=

Interpolate a fraction of the way between two lines:

 In[2]:=
 Out[4]=

### Scope (4)

Interpolate two lines at multiple fractions:

 In[5]:=
 Out[7]=

Blend between three lines:

 In[8]:=
 Out[11]=

Interpolate between two lines in 3D:

 In[12]:=
 Out[14]=

Interpolate a line in 4D:

 In[15]:=
 Out[17]=

### Applications (2)

Create a grid:

 In[18]:=
 Out[18]=

Design a fancy curved rooftop design using straight beams:

 In[19]:=
 Out[23]=

### Properties and Relations (2)

Lines do not need the same number of data points. The resulting line can have more points than the original ones:

 In[24]:=
 Out[26]=

Extrapolate beyond the original lines by using numbers outside the range (0,1):

 In[27]:=
 Out[29]=

### Neat Examples (2)

Interpolate between an octagon and a hexagon:

 In[30]:=
 Out[30]=

Interpolate between a circle and a square:

 In[31]:=
 Out[32]=

SHuisman

## Version History

• 1.0.0 – 12 September 2019