hi up there i am facing this problem i hope someone can help me with.

- to help you understand the problem imagin a small ball moving randomly right and lift over a ruler .

- what i want is to hold this ball movment and i am doning this through puting two signs R(wich have a positive value if the ball moves to the right and nigative value if the ball move to th left) and L(wich have a positive value if the ball moves to the left and nigative value if the ball move to th right).

- the initial value of R and L is not important cdan be any numbers.

- the value of R or L is its initual value multiply by hte distant the ball move through the ruler .

- through puting these markes in the rouler if the total value of Rs and Ls markes

become positive i hold the ball movment and the problem is solved.

- in the drow i attched i but tow markes 4 R and 3L asuming that the ball will move to the right .

- if the ball moves to right 1 unite the total R and L value is (4R*1)+(3L*1)=+1 and i stop the ball movement becouse i get the positive value i want.

- if the ball start it move to the left insted right 1 unit the sum of R and L will be (4R*1)+(3L*1)= -1 .

- in this moment to solve the broplem i put another L mark .

- if the ball keep its move to the left one unit the sum will be (4R*2)+(3L*2)+(3L*1)= +1 so the problem solved couse i get the positive value i want.

- the problem in this design is if the ball after i put the secound L mark dosent move the left but reverse its move to the right becouse as i said in the first the movement of the ball in not predictable .

- what i want is design using R and L as many as it takes .

- you can open and close R and L as you want and when ever you want .

- the most important thing is to stop ball movement when the total value of R and L is positive .

- i am ready to clear any thing about the problem if needed.

thanks once more for your time.