visuals to movments

Any idea how I can translate a shape to servo movements?
Lets say a 10 sm strait line to servo movement for 10 sec. to the right

This is called a schedule. You write a function that calculates “at this point in time, this is where the servo should be moved.” The calculation could be from a data table, or from a mathematical formula. Then you call that function on a regular basis, say, every loop() or every 20ms, and whatever position it returns, you drive the servo to that location.