Search - User list
Full Version: How to approach the following task to move point on a line
Root » Technical Discussion » How to approach the following task to move point on a line
Anh Em oi
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
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).
zengchen
Is it the effect you wanted?
Anh Em oi
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.
zengchen
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…
Anh Em oi
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
Anh Em oi
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
zengchen
Maybe use DOP (Vellum or RBD) or Rigging is better.
I just use vex + solver to approach it.
Anh Em oi
Wow, thank you very much!!!!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB