Skip to content
May 18 12

Check out the android app I finished recently

by admin

It is based upon the Drake Equation which estimate the number of detectable extraterrestrial civilizations in the Milky Way galaxy. It is pretty simple, but it is a start.

Drake App

Apr 19 12

Using PHP with MySQL examples

by admin

I will continue to add to the list. These are just some simple examples. Remember just put them in between php tags and place the code in a php file. All of them you will have to add your username, password, database and table name(except for view tables).

read more…

Apr 14 12

How to Select a Row in a MySQL Database using the URL

by admin

On a recent school project, we was making a website that had a social network element. After the user created his account and loged in, he could see his profile. This was useless because no one else could see it. I needed a way so that ever member had a unique URL.  So I created a template that only information from the database to create the webpage. It is very simple to query a MySQL database using the URL.

read more…

Apr 10 12

Using a html form to pull up a member’s Facebook photo or Twitter Feed

by admin

This is very vague, but I figure someone would want to do it out there. Even though they are very similar, I will show how to grab a Facebook profile photo first.

My ID: 100000278497888

read more…

Apr 1 12

Very simple contact form

by admin

Here is an example of using PHP with html form data to make a contact form for a web site. This is also a good example of grabbing HTML form data with PHP and using it.  Here is the demo:

 

 

read more…

Mar 10 12

Send a text to a friend from a website

by admin

I am working on a page to send text messages from the web.  I know there is a lot out there, but I hope to do a better job. Let me know if you have any request or comments.

 

Send a Text 

Feb 14 12

Central State Mental Hospital (Milledgeville, GA)

by admin

Traveling back from Savannah, GA we decided to swing by the Central State Hospital. Built in 1842 and peak population of 12,000 patients this place was a must see for me.  I was expecting a single large building but instead it was very large campus style layout. I was not able to find the graveyard which they used numbers instead of name markers. Here the pictures from our trip, sorry I did not go inside.

read more…

Dec 11 11

GLSL Bump Mapping

by admin

This is my last post on GLSL. To tell the truth after all these post on GLSL I do not fully understand it. Either way here is bump mapping using GLSL. To make more sense of bump mapping here is an except from my project.

Bump mapping is an alternative to normal mapping in that it uses a grayscale height map instead of an RGB map. The height map determines how high something is. However, we won’t be actually moving any vertices. Like normal mapping, we will only change the normals.

As you may recall, the normal is perpendicular to the surface underneath. Another way to put it is that the normal is perpendicular to the tangent of the surface. Hence, we need to first calculate two tangents. To calculate a tangent, we need to know the height value just above and below (or to the left and to the right) of the current position. We can offset the texture coordinates in four different ways and use these offsets in four calls to texture2D. Note, for some maps, you may need to fiddle with this offset value to get something right (….this is probably why normal mapping is more prevalent in industry….). Once you have the two tangents, simply cross them and normalize to get the new normal.

I changed the camera angle to show the bumps better.

read more…

Dec 10 11

GLSL Normal Mapping

by admin

Here is my version of GLSL Normal Mapping. A normal map is an RGB texture where the RGB value corresponds to the XYZ of the normal. Since we are only doing mapping onto a quad, we simply need to replace (not offset) the old normal with this new read normal. There is one caveat, however. RGB values range from [0,1] while normal directional values can range from [-1,1]. The same should go for green and blue.

I tried to do Blinn-Phong reflection but i am not sure if it is correct.

read more…

Dec 9 11

GLSL Desert Mirage/Heat Wave Effect

by admin

Here is another GLSL code sample from my project. This one was fairly easy after they gave us the formula to use. Here is the code and image of the results.


read more…