user189324
user189324

Reputation:

"Normalize" procedure in C#

Could someone explain to me what the normalization procedure for 3D surface mesh in C# is?

In a reference book, there is a line as follows :

The GetNormalize method is used to map the region of your surface into a region of [-1, 1], which gives you a better view on your screen.

Upvotes: 0

Views: 608

Answers (1)

Blindy
Blindy

Reputation: 67382

You calculate the box bounding your surface mesh, get the longest side of the box and scale everything down by that value. The result will be [0,1] for that side and [0,<1] for the rest.

If you need [-1,1], you double everything and substract 1, getting [0,1]*2-1=[0,2]-1=[-1,1].

Upvotes: 1

Related Questions