Thursday, March 26, 2009

Web Exercise #3 - March 20th

After a lot of reading, I've got a better understanding of the commands that control the view of the camera (view from the eye).

Here is the part in #2 running:



For the last part, I was instructed to take a look at the special keys functions we have been using to rotate the object or view. I took an example from Chapter 3 of the Programming Guide for OpenGL which is a quarter of a wire sphere. I took out the clipping plane parts and it drew a whole wire sphere. I used glLookAt() and glFrustum to change it up a little bit to mess around and see what it actually did.

Here is a picture of the sphere because I don't think I can upload an executable.



I couldn't find the code that I used, but it is the 4th of a sphere that I used...I just took out the clipping plane stuff!

Tuesday, March 17, 2009

Web Assignment #2

I started looking at this over spring break and realized that I didn't want to do work so I decided to start working on this Sunday. Here's what I came up with:

OpenGL ES - OpenGL ES is "a cross-platform API for full-function 2D and 3D graphics on embedded systems." OpenGL ES is used on cell phones, consoles, and appliances as well being used in vehicles. There are two types of OpenGL ES: 1.X and 2.X. The first type is for fixed function hardware and it offers performance, acceleration, and great image quality. 2.X on the other hand is for programmable hardware. Some advantages of OpenGL ES are: industry standard and royalty free, small footpring and low power consumption, seamless transition from software to hardware rendering, extensible and evolving, easy to use, and well-documented (in case you need guidance).

Processing and OpenGL - There is an option to use OpenGL rendering in Processing. This allows Processing to use the cross-platform graphics interface for 3D and 2D graphics and utilize the speed of an OpenGL accelerated graphics card. When using OpenGL in Processing, you have the chance to draw more to the screen and a chance to create larger windows. However, you might have issues if you don't have an OpenGL accelerated graphics card. To use OpenGL in Processing, simply import OpenGL through this statement: import processing.opengl.*; You also have to specify, in order to use OpenGL, OpenGL as a third parameter in the size() function in setup(). OpenGL in Processing is really memory hungry and has a potential to crash computers if it is trying to process a large amount of drawings to the screen.

PyOpenGL - PyOpenGL is the Pythonic OpenGL API. This is basically programming in Python using the OpenGL API. Python is an easy language to write in. It has no punctuation for endings unlike Java, or C/C++ which use a ';' to denote the end of a line. Everything is done by indentation as well which shows ownership of what is in a for loop or while loop or in a specific method/class. There are some advantages to using PyOpenGL: Calls to OpenGL automatically come with exceptions when things are wrong in the code; there is no need to compile since it is Python which means you can change code faster; PyOpenGL is open source so it's changing daily.

1. I have changed the 'lstrips' example to draw a specific bezier curve and be able to rotate it. Here is a picture of what I did:



2. Here is "Perspective Projection": I changed it up to make it look like a triangular prism. The color scheme is a tie-dye...anyways...something we haven't seen is the lighting aspect of it.

Wednesday, March 4, 2009

The First Project!!!

Wow, this was pretty fun, I'm not gonna lie. I did the Twisted World one where you had to use NodeBox to create some pictures swirling around on the screen. Basically I set up the first canvas to be the size of the picture for the central image. You can either do like Twisted World did and have no central image and just swirl around random pictures or you can have a central picture and swirl pictures around that. I did the latter. I had to download the web.zip file and the coreimage.zip files in order to be able to use the canvas stuff and be able to access pictures from Flickr. I tried to get some pictures from Google, but I couldn't ever figure out how to do that so I just stayed with Flickr. Once all of those files were imported, I created about 20 random layers and took around 50 pictures from Flickr, or however many pictures it could get within about 30 seconds or less. I added twirl, noisereduction, and starshine effects to the pictures that I grabbed. I rotated them, scaled them, and sometimes I flipped them. After this, I chose the central image and appended, or placed, all of these layers on to a second canvas and drew that to the NodeBox screen. All and all it was a lot of fun and I really enjoyed doing this project. Here are some examples of my pictures that I created:








I must give credit to the Twisted World Example found on Nodebox.net. I also must give credit to Flickr for providing the randomly grabbed pictures. And I must give credit to Google for providing me with some of the central pictures!

Tuesday, March 3, 2009

Dev C++

So I had to get some help in compiling some code to get it to work. I had to download something and install it in Dev C++ since I have a Windows computer that is so much different from everything else, it seems like...Anywho, here is the picture to show that I got this Simple.cpp to compile on Dev C++: