Bipolar stepper motor microstepping

Bipolar stepper motor have 2 coils which are placed 90 deg (electrical) apart. In order to drive the bipolar stepper motors in microstepping mode, 2 signals (sine and cosine) are fed into the 2 coils, which in turn generate a rotating magnetic field. The rotor moves in sync with the rotating magnetic field.

Hence electrically, such a drive could also be called as a 2-phase synchronous motor.

The sine table used to create the waveform is based on an excel sheet (attached below). The plot of the sine table is shown below: -

Some voltage waveform capture (zoomed and normal). Please note that since the voltage measurement was taken based on DC ground referenced, the AC sine wave will appear as full wave rectified sine wave. Note the sine/ cosine relation between the 2 phases (yellow and blue).

Code attached below.