How to split a line into sections

Please help me, i’m making a robot next to the line, I was able to find tge line but i don’t understand how to split it into zones as in photo below