Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does it mean to normalize a value?

I'm currently studying lighting in OpenGL, which utilizes a function in GLSL called normalize. According to OpenGL docs, it says that it "calculates the normalized product of two vectors". However, it still doesn't explain what "normalized" mean. I have tried look for what a normalized product is on Google, however I can't seem to find anything about it. Can anyone explain what normalizing means and provide a few example of a normalized value?

like image 478
TheAmateurProgrammer Avatar asked Jul 25 '12 07:07

TheAmateurProgrammer


People also ask

What does it mean to normalize a result?

Normalization is the process of reorganizing data in a database so that it meets two basic requirements: There is no redundancy of data, all data is stored in only one place.

What does it mean to normalize a variable?

From wiki.gis.com. Normalization or Standardization is a process of transforming a variable into a more analytically useful form, usually using a ratio. Raw statistical data is often susceptible to misinterpretation, and normalization is one method of correcting for this.

What does it mean when you normalize something?

Definition of normalize 1 : to make (something) conform to or reduce (something) to a norm or standard … a standard written language that by 1776 had become normalized in grammar, spelling, and pronunciation.


2 Answers

I think the confusion comes from the idea of normalizing "a value" as opposed to "a vector"; if you just think of a single number as a value, normalization doesn't make any sense. Normalization is only useful when applied to a vector.

A vector is a sequence of numbers; in 3D graphics it is usually a coordinate expressed as v = <x,y,z>.

Every vector has a magnitude or length, which can be found using Pythagora's theorem: |v| = sqrt(x^2 + y^2 + z^2) This is basically the length of a line from the origin <0,0,0> to the point expressed by the vector.

A vector is normal if its length is 1. That's it!

To normalize a vector means to change it so that it points in the same direction (think of that line from the origin) but its length is one.

The main reason we use normal vectors is to represent a direction; for example, if you are modeling a light source that is an infinite distance away, you can't give precise coordinates for it. But you can indicate where to find it from a particular point by using a normal vector.

like image 72
benzado Avatar answered Sep 25 '22 19:09

benzado


It's a mathematical term and this link explains its meaning in quite simple terms:

Operations in 2D and 3D computer graphics are often performed using copies of vectors that have been normalized ie. converted to unit vectors... Normalizing a vector involves two steps:

  1. calculate its length, then,
  2. divide each of its (xy or xyz) components by its length...
like image 24
momatrix Avatar answered Sep 24 '22 19:09

momatrix