I have a angle 'q' defined by the following equation:
q = 150*(t**2)
I'm trying to plot a graph that contains the variation of q based on the time, but the angle goes further than 2pi if I try to plot it for more than 1 cycle of rotation, I need to "reset" the angle to 0 when it reaches the value of (2pi) as the system returns to it's start at the end of every cycle, does anyone have any clue of how can I do that on python?
Image containing the angle "q" that I'm talking about
my plotting code is:
import numpy as np
import matplotlib,pyplot as plt
t = np.arange(0,7*0.06097,0.001) # time for 1 cycle is 0.06097s. I'm plotting for 7 cycles.
q = 150*(t**2)
plt.plot(t,q)