Plotting 10 Millions points per second in python

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up everyone this is gonna be a quick demonstration of some stuff I've been playing around with using PI QT graph and OpenGL so here's an example of rendering a bunch of sine waves with varying frequency phase shift and amplitude and my goal is to demonstrate just how powerful OpenGL is for a graphics rendering so quick rundown of what you see here if i zoom out a bit what it is is 50 sine waves and you can see here that they're coloured so the lower frequency ones are red and the higher frequency ones are violet just like the visual spectrum and then the amplitude increases with wavelength so the longer wavelength waves have a bigger amplitude and then the shorter wavelengths have a smaller amplitude and then also the phase shift is larger for the high frequency waves so these violet waves are moving a lot faster than the low frequency one so it's the phase is increasing faster each render so you can see here it's a pretty cool visualization especially like you get these points where they all sort of meet in phase so if I just go sideways view you'll see you'll get this trough like right there where they all sort of line up in phase so yeah just a simple example but just to give you an idea of how powerful this is so there's 50 sine waves each sine wave is 1000 points so that means each frame is 50 times 1000 so we're rendering 50,000 points per frame and then if I look at my atom window you can see that the output we're getting anywhere between like 150 and 200 frames per second so if we're getting up to 200 frames per second that means that we're plotting 10 million points per second so to me that's pretty impressive there's just no way we could do this using matplotlib and the CPU so with the utilizing the graphics card with OpenGL you can see we can do some pretty impressive stuff so and if needed you know we could push this a little harder and plot a few more points and we still have really high frame rate so this is just kind of a cool example the next step in the audio visualization series we're going to add the audio reactiveness so the idea is to have this thing react to some audio input like either from the microphone or for an mp3 or something like that so stay tuned for that one I'm gonna post this code on my github there'll be a link in the description so if you're interested have a look play around with it modify it however you like and yeah that's gonna do it for this one if you've got any comments leave them below if you liked the video leave a like and stay tuned for the next one see you guys
Info
Channel: Mark Jay
Views: 15,481
Rating: undefined out of 5
Keywords: openGL, 3D plotting, 3D animation, python, pyqtgraph, GPU, graphics, visualizer, audio spectrum, fourier transform, FFT, jupyter, matplotlib, python3, audio analyzer, spectrum, high speed plotting, FPS, frames per second, CUDA, Nvidia, C++
Id: JWew47CiV-I
Channel Id: undefined
Length: 3min 7sec (187 seconds)
Published: Sat Oct 14 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.