I don't think it can be done that way. The lower 'X' axis motor can only be used to adjust the distance from the laser. You need something to move the laser up and down or rotate the object along the axis looking into your diagram, in other words clockwise or anticlockwise as shown.
You might be able to do it if you alter the laser angle from horizontal so it's spot moves up and down the object as the 'X' distance changes but bear in mind the spot may de-focus as the angle it strikes the object changes.
Brian.