Skip to main content
gamedev.net
🔒 Locked

Vector question

Started by Slug 1 reply 300+ views
Original Post
Slug
Slug
How can i calculate the normal of a vector and what this mean?
Yratelev
Yratelev
The normal of a vector, is the vector with the same direction,as the original, but length 1. To calculate, first get the length of the vector (assuming a 3d Vector here)

Length: l = SquareRoot(x*x + y*y + z*z)

where x, y, z are the components of the vector.

Next divide each component by the length:

x = x/l;
y = y/l;
z = z/l;

now u have a normal, or unit, vector.

Hope it helps!

Yratelev
Yratelev
joanusdmentia
joanusdmentia
One common use of a normal is to specify a direction. For example, the normal of a plane is the direction of the 'up' side of the plane.
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The nly verdict is vengeance; a vendett o

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.