A headlamp for a vehicle comprising: a light source (15, 15R, 15G, 15B) adapted to emit a spotlight; a lens (16, 16R, 16G, 16B) adapted to receive and transmit said spotlight; a lens actuator (17, 17R, 17G, 17B) adapted to adjust a size of said spotlight transmitted through said lens (16, 16R, 16G, 16B); a two-dimensional optical deflector adapted to deflect said spotlight from said lens (16, 16R, 16G, 16B) to an illumination area ahead of said vehicle; and a control circuit, characterised in that the the control circuit is configured to control said lens actuator (17, 17R, 17G, 17B) in such a way that irregularity of illumination in said illumination area in the vicinity of a cut-off boundary line in said illumination area is avoided by changing the size of said spot light; wherein said two-dimensional optical deflector comprises: a mirror adapted to reflect said spotlight; a movable frame; a first piezoelectric actuator (1831, 1832, 1841, 1842; 189a, 189b) fixed between said movable frame and said mirror, adapted to rock said mirror with respect to a first axis of said mirror; a support body; a second piezoelectric actuator (186a, 186b) fixed between said support body and said movable frame, adapted to rock said mirror with respect to a second axis of said mirror perpendicular to said first axis, said control circuit being configured to apply a first drive voltage (V Xa, V Xb; V X1, V X2) to said first piezoelectric actuator (1841, 1842; 189a, 189b) and apply a second drive voltage (V Y1, V Y2) to said second piezoelectric actuator (186a, 186b), so that a plurality of scan lines (SL 1, SL 2, ···, SL 480) are depicted by said spotlight in said illumination area, the closer to a cut-off boundary line said scan lines (SL 1, SL 2, ···, SL 480) are, the larger a density of said scan lines (SL 1, SL 2, ···, SL 480); wherein said control circuit is configured to control said lens actuator (17, 17R, 17G, 17B) to change the size of said spotlight defining a line width of said scan lines (SL 1, SL 2, ···, SL 480) in accordance with said second drive voltage (V Y1, V Y2), the closer to said cut-off boundary line one of said scan lines (SL 1, SL 2, ···, SL 480) is, the larger the line width of the one of said scan lines (SL 1, SL 2, ···, SL 480). a light source (15, 15R, 15G, 15B) adapted to emit a spotlight; a lens (16, 16R, 16G, 16B) adapted to receive and transmit said spotlight; a lens actuator (17, 17R, 17G, 17B) adapted to adjust a size of said spotlight transmitted through said lens (16, 16R, 16G, 16B); a two-dimensional optical deflector adapted to deflect said spotlight from said lens (16, 16R, 16G, 16B) to an illumination area ahead of said vehicle; and a control circuit, characterised in that the the control circuit is configured to control said lens actuator (17, 17R, 17G, 17B) in such a way that irregularity of illumination in said illumination area in the vicinity of a cut-off boundary line in said illumination area is avoided by changing the size of said spot light; wherein said two-dimensional optical deflector comprises: a mirror adapted to reflect said spotlight; a movable frame; a first piezoelectric actuator (1831, 1832, 1841, 1842; 189a, 189b) fixed between said movable frame and said mirror, adapted to rock said mirror with respect to a first axis of said mirror; a support body; a second piezoelectric actuator (186a, 186b) fixed between said support body and said movable frame, adapted to rock said mirror with respect to a second axis of said mirror perpendicular to said first axis, said control circuit being configured to apply a first drive voltage (V Xa, V Xb; V X1, V X2) to said first piezoelectric actuator (1841, 1842; 189a, 189b) and apply a second drive voltage (V Y1, V Y2) to said second piezoelectric actuator (186a, 186b), so that a plurality of scan lines (SL 1, SL 2, ···, SL 480) are depicted by said spotlight in said illumination area, the closer to a cut-off boundary line said scan lines (SL 1, SL 2, ···, SL 480) are, the larger a density of said scan lines (SL 1, SL 2, ···, SL 480); a mirror adapted to reflect said spotlight; a movable frame; a first piezoelectric actuator (1831, 1832, 1841, 1842; 189a, 189b) fixed between said movable frame and said mirror, adapted to rock said mirror with respect to a first axis of said mirror; a support body; a second piezoelectric actuator (186a, 186b) fixed between said support body and said movable frame, adapted to rock said mirror with respect to a second axis of said mirror perpendicular to said first axis, said control circuit being configured to apply a first drive voltage (V Xa, V Xb; V X1, V X2) to said first piezoelectric actuator (1841, 1842; 189a, 189b) and apply a second drive voltage (V Y1, V Y2) to said second piezoelectric actuator (186a, 186b), so that a plurality of scan lines (SL 1, SL 2, ···, SL 480) are depicted by said spotlight in said illumination area, the closer to a cut-off boundary line said scan lines (SL 1, SL 2, ···, SL 480) are, the larger a density of said scan lines (SL 1, SL 2, ···, SL 480); wherein said control circuit is configured to control said lens actuator (17, 17R, 17G, 17B) to change the size of said spotlight defining a line width of said scan lines (SL 1, SL 2, ···, SL 480) in accordance with said second drive voltage (V Y1, V Y2), the closer to said cut-off boundary line one of said scan lines (SL 1, SL 2, ···, SL 480) is, the larger the line width of the one of said scan lines (SL 1, SL 2, ···, SL 480).