I model changes in cyclotron line energy with luminosity, considering the effect of polar cap dimensions and changes in beam pattern as well as shock height. Cyclotron lines are calculated by a superposition of a large number of cyclotron lines formed in different heights of an accretion column. Cyclotron line energy has been observed to change with luminosity in a number of accreting X-ray pulsars. In X0115+63 and V0332+53, the fundamental cyclotron line energy has been observed to decrease with increasing luminosity. This phenomenon has been interpreted as a change in shock height with luminosity. However, the rate of the change seems to be very different, in which the line energy in V0332+53 seems to vary slowly with luminosity compared with that in X0115+63. I found that the changes in the cyclotron line energies with luminosity can be explained by changes in beam pattern and the size of a polar cap rather than a shock height.