17.5 ROTATING PHASOR AND SINUSOIDAL WAVE

We cannot imagine our world without electric power. In electrical engineering, first thing is to learn generation of sine wave. A rotating vector known as phasor is responsible for it. A phasor rotates at a given angular speed. Its component on y-axis decides the magnitude of sine wave. This fact is described in Figure 17.2.

Let us base our first graphical program on this phenomenon.

Problem: Write a program to show a “Rotating Phasor” and generated sine wave.

Solution: In electrical engineering, it is assumed that a phasor (vector) is rotating at constant angular speed. Its component on y-axis decides the magnitude of the waveform at that instance. Therefore, one rotation of vector results in one cycle ...

Get Object Oriented Programming with C++, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.