Skip to content
Dec 8 11

GLSL Edge Detection

by admin

Here is an edge detection I created for class.  I used a Laplacian stencil sums up, down, left, and right values and subtracts them by 4 times the center value.

 


read more…

Nov 20 11

GLSL Phong and Gouard Shading

by admin

I recently wrote a program for class the compared Phong and Gouard shading using the OpenGL shader language GLSL. To sum it up in a couple of sentences, Gouard shading uses per-vertex shading and Phong uses per fragment/pixel shading. Gouard will look more flat shading because the triangles (triangle mesh) will have a solid color. Phong shading colors per pixel so the triangles can vary in color inside the triangles.  In GLSL the lightening calculation will be calculated in the vertex shader for Gouard and in the fragment shader for Phong.

Nov 3 11

Find the closest point

by admin

This post is the third installment from my post (How to detect a collision between a circle and a line).  In this post I will show how to find the closest point to a point/circle. It is pretty straight forward after you know how to determine the distance between 2 points. read more…

Oct 27 11

Determine if a point/ball is above a line

by admin

This post is the second installment from my previous post (How to detect a collision between a circle and a line).  In this post I will show how to determine if a circle or point is above a line. If you know anything about a dot product of two vectors then you probably could come up with the ‘if’ statement yourself. Without going in to too deep of details about dot products, it is basically means if two vectors point the same direction then their dot product will be greater then zero.

read more…

Oct 20 11

How to detect a collision between a circle and a line.

by admin

I just now finished another computer graphic school project and want to share a few things. As you can tell there is a few bugs, but that is a different story. So far I am going to do this any many parts. I wanted to start off by talking about how to detect a collision between a circle/ball with a line. I will later talk about how to find the reflection, what to with many different lines and what else I can brew up.

Here is a visual of what I am talking about:

read more…

Sep 9 11

Curve Subdivision using Neville’s Method

by admin

Here is some code and an applet of showing how the Neville’s method affects curve subdivision.  How to use the applet is on the bottom. Check out my previous post on an applet that just uses Neville to compute a curve. Enjoy!

Subdivision with Neville’s Method

 

Sep 1 11

Neville’s Method code and program

by admin

Here is a project I implemented recently  in class. It uses the Neville Method to interpolate 4 points. Press the number of the dot to control the dot. This is a non-recursive version on it. The code is sorta hard to follow, but email me if you have any questions greenbizkit33 [at] gmail.com.

Neville’s method code and program

Aug 13 11

E = MC^2 Calulator

by admin

I created another useless calculator. Hope someone finds it helpful. You can either calculate the mass or the energy in E = MC^2

read more…

Aug 12 11

JavaScript Code for a Simple Calculator

by admin

My last blog post I created a Drake calculator. As promised here is the code to it. This can be easily converted to any calculator. There is a few parts that are embarrassingly bad coding. So scrap what you need. read more…

Aug 11 11

Drake Equation Calulator

by admin
Here is a calculator for the Drake equation that i coded up with JavaScript. I plan to make more calculators in the future and will post the code for calculator soon.

In case you do not know what the Drake Equation is, here is a paste from Wikipedia about it:

The Drake equation (sometimes called the Green Bank equation or the Green Bank Formula) is an equation used to estimate the number of detectable extraterrestrial civilizations in the Milky Way galaxy. It is used in the fields of exobiology and the Search for ExtraTerrestrial Intelligence (SETI). The equation was devised by Frank Drake, Emeritus Professor of Astronomy and Astrophysics at the University of California, Santa Cruz.

read more…