You can do some really simple 3d graphics using the mesa opengl library (forgive me if my terminology is wrong). I don't have an example to hand, but if you search for something like "simple opengl tutorial" or just "opengl tutorial" or something like that on google you'll probably find quite a few good articles.
One thing to look for is "The Red Book". It's a (rather large) book that you can download on 3d graphics, but it's quite a big read.
I could have gone out of my way to give you an example, but my point is that all the information you are looking for is available and easily located using google or some other search engine. I even gave you some tips on what to search for. There really isn't any point in someone giving you an example here because it would either have to be rather in depth or it would be an example that was so simple that it didn't really hold any worth for you. Much better to read a tutorial that explains stuff rather than just saying "use these functions" without explaining what they are doing.