# Move Points

## Recommended Posts

I'm trying to figure out how to move lets say point0 90% in Y towards point 1. When it moved 90% then move both point0 and point1 90% in Y to point2.

What im trying to create is theater curtains and I gotten pretty far, but I want to make a lil better.

I drew a picture which might make it easier to understand. You can also check out the file what I got so far, of course I would need to have better settings etc.

Any idea highly appreciated!

Edited by dfmn

##### Share on other sites

"linear interpolation"

linear.hipnc

##### Share on other sites

For vertical line with several points it is as simple as:

```// Point wrangle.
@P.y += max(0, @Time - @P.y) + @ptnum / 10.0;```

Ask, if you will have problems with actual, more complex setup.

curtain_constraint.hipnc

• 6

##### Share on other sites
48 minutes ago, f1480187 said:

For vertical line with several points it is as simple as:

```
// Point wrangle.
@P.y += max(0, @Time - @P.y) + @ptnum / 10.0;```

Ask, if you will have problems with actual, more complex setup.

wow thats amazing! Thanks!

##### Share on other sites

@f1480187 is it possible to give each point a little delay before they start moving again? something like this:

I can just do it by hand, but I also trying to learn get better at houdini so this is very good learning for me!

Edited by dfmn

##### Share on other sites

Sure, it is easy with a ramp. Input geo here must have a point per meter of height, to match with seconds of @Time variable. You also could multiply @Time by desired meters per second value.

```// Point wrangle.
float timeramp = floor(@Time) + chramp("timeramp", frac(@Time));
@P.y += max(0, timeramp - @P.y) + @ptnum/10.0;```

Edited by f1480187
• 6

##### Share on other sites

@f1480187 wow!... Thank you so much sir, this is amazing. Gonna try to recreate it in vops so I can understand how it works!

## Create an account

Register a new account

×
• Donations