Interpolating a Mesh through Curves

calendar_today

28.01.2024

label

Hard-surface

mouse

Houdini 20.0

Description

A radial basis function (RBF) accumulates all point positions of the input curves and weights them by an exponentially decreasing squared distance to the mesh surface.

1 Code

C
        float a = chf('a');

float w    = 0.0;
vector pos = 0.0;

for(int i = 0; i < npoints(1); i++){
    vector pos_pt = point(1, 'rest', i);
    float r = distance2(v@P, pos_pt);
    float weight = exp(-a * r * r);
    
    w += weight; 
    pos += pos_pt * weight;
}

v@P = pos / w;
    
download

Downloads

link

Related articles

favorite

181

label

Hard-surface

Aircraft propeller

favorite

324

label

Hard-surface

Ball

favorite

145

label

Hard-surface

Bike helmet

favorite

267

label

Hard-surface

Bottle from cylinder using VOPs

favorite

200

label

Hard-surface

Bridging and Chaining Shapes

favorite

219

label

Hard-surface

Concept Chair