version with 3 steps for line approximation width