# First steps with OpenGL and Vispy

Written by Lucas on

Wow, we've already passed the first two weeks of the Google Summer of Code! So it's time for a little report on the current progress. I do have quite a lot of study assignments, so unfortunately I was not able to devote as much time to the GSoC as I planned to do, but there's is definitely some progress!

### Bezier Lines

I've ported the code for drawing curved lines from Glumpy to Vispy. This was quite easy as the code written by Nicolas Rougier didn't have any exotic dependencies and I actually just copied the file and fixed some imports. I did write an example how to use this Bezier lines module, which can be found here.

### Arrow heads

This has been a more challenging assignment. Glumpy has several OpenGL shaders for drawing arrows. I want to port these arrows, but with a slight change: I only want to draw the arrow heads. In this way the user can draw any line he or she wants, and optionally include any arrow head, with automatic orientation of the head.

For one without a computer graphics background and without much OpenGL experience, some of this shader code looks like a lot of magic, but luckily there's one thing that sort of saves me: my linear algebra knowlegde. With a notebook besides my keyboard where you can write down the mathematical formulas, visualizing the vertices used, etc. its inner workings are slowy revealed. The current result can be seen in the picture below.

I'm not sure yet why the first arrow head is oriented in the wrong way, and the curved arrow heads are still a bit to big, but we're getting there! I'll write a separate blogpost in the coming weeks on the mathematical principles behind drawing these shapes.

Anyway, until next time!