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

   3230   8   2
User Avatar
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.

Thanks for your help
Edited by Anh Em oi - July 2, 2020 02:42:05

Attachments:
houdini problem.jpg (125.3 KB)

User Avatar
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)

User Avatar
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)

My Youtube Channel [www.youtube.com]
User Avatar
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.
https://www.youtube.com/watch?v=kjM4mJ4pKXE [www.youtube.com]

Thanks for your help.
User Avatar
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
My Youtube Channel [www.youtube.com]
User Avatar
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.
Thanks for your help
Edited by Anh Em oi - July 2, 2020 09:37:02
User Avatar
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.
Thanks for your help
User Avatar
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)

My Youtube Channel [www.youtube.com]
User Avatar
Member
10 posts
Joined: April 2020
Offline
Wow, thank you very much!!!!
  • Quick Links