Project using a potentiometer

For a project I am trying to mimic the sun’s movement using 10 LEDs placed a long an arc and was wondering if it is possible to use a potentiometer that when adjusted would turn an LED on in sequence along that arc. So essentially the LED sequence would move left or right depending on the direction the user is adjusting the knob to mimic a user-controlled sun. If possible, what would be the best way to achieve this?

Pretty easy

void loop(){
int val = analogRead(potPin);
if (val <100){digitalWrite (2, HIGH);}
else }{digitalWrite (2, LOW);}
if (van >=100 && val < 200){ digitalWrite (3, HIGH);}
else {digitalWrite(3, LOW);}
etc for pins 4-11 and additional ranges

Define variables, add pinMode to setup(), etc.