### How to approach the following task to move point on a line

2207   8   1
Member
10 posts
Joined: April 2020
Offline
Hello

I want to create a line with a given length X. The number of points depends on the length Y.
The point with the highest point number supposed to be static. Now I want to move the point 0 and
all points in-between supposed to move following these rules.

- the maximum distance between the points is the length Y
- the minimum distance between the points is a constant C
- the overall maximum distance the point 0 can move is C*Number of points

Then it should show the following behavior.

I move point 0 to the right until it reach the minimum distance to point 1, now it pushes point 1 along until it reach the minimum distance to point 2 and so on. When I move point 0 again to left, just point 0 moves, until the maximum distance is reached, now it drags point 1 to the left as well.

Edited by Anh Em oi - July 2, 2020 02:42:05

Attachments:
houdini problem.jpg (125.3 KB)

Member
40 posts
Joined: Aug. 2018
Offline
Hi,

Here's a way of doing it, provided that I didn't forget anything, with Simple SOPs and Hscript expressions only (you didn't mention if you wanted VEX or not).
Edited by Herve - July 2, 2020 04:32:57

Attachments:
simpleSOPS_approach.hipnc (71.8 KB)

Member
77 posts
Joined: Feb. 2017
Offline
Is it the effect you wanted?
Edited by zengchen - July 2, 2020 06:24:57

Attachments:
test.gif (475.4 KB)

Member
10 posts
Joined: April 2020
Offline
zengchen
Is it the effect you wanted?

almost, when you increase the value in current distance its doing what I want, but when you decrease the value it pushes the point in the wrong order. I want that the left point moves until it reaches the next one, then pushes this point until both reach the next one.

I want to use it in order to create a vertical blind. Maybe this video shows better then I can describe it.

Member
77 posts
Joined: Feb. 2017
Offline
mellowmesher
almost, when you increase the value in current distance its doing what I want, but when you decrease the value it pushes the point in the wrong order. I want that the left point moves until it reaches the next one, then pushes this point until both reach the next one.

I think it may need a solver, to switch increase / decrease situation frame by frame.
I do not know rigging, maybe it will be a better way than vex…
Edited by zengchen - July 2, 2020 08:42:31
Member
10 posts
Joined: April 2020
Offline
Looking closer to your setup, I have an idea how to you this in a different project. So if you would like to share it, I would really appreciate it.

For this project I will check out your suggestion to use a solver.
Edited by Anh Em oi - July 2, 2020 09:37:02
Member
10 posts
Joined: April 2020
Offline
Herve
Hi,

Here's a way of doing it, provided that I didn't forget anything, with Simple SOPs and Hscript expressions only (you didn't mention if you wanted VEX or not).

I had to hit the road so I did not have the time to look into your file. Will do it on sunday.
Member
77 posts
Joined: Feb. 2017
Offline
Maybe use DOP (Vellum or RBD) or Rigging is better.
I just use vex + solver to approach it.

Attachments:
test1.gif (927.4 KB)
test.hipnc (100.4 KB)

Member
10 posts
Joined: April 2020
Offline
Wow, thank you very much!!!!