A while ago I ordered a OLED and carrier board from SparkFun. The OLED has amazing contrast. You can not tell where the screen is when it is blank. With LCD (that have backlights) when the screen is black you can still see a little light coming though. With OLED each pixel emits their own light so you get the darkest black and the brightest white.
I decided to have fun with the line function that is built into the OLED. The odd thing about the controller is it will not let you draw a line with negative slope, for example from the bottom left corner to the top right. If you attempt to do this then the line is often draw but in some random location. I got over this as all I needed for my example was horizontal lines and they work fine.
I wanted to try my luck with 3-D graphics like with the PIC but this time solid polygons. To draw solid graphics you draw a series of horizontal lines of varying lengths.
All 3-D objects using this method are made of triangles. A triangle consists of three, 3-D points. After the triangle is rotated, translated, and projected the slopes of the three lines are calculated when needed. By using the slope and a point you can find any point on the line. My code uses the formula y=mx+b to find the end points of the horizontal lines. This is all contained in the function get_lines().
The entire code and the hex file are available here.