C# Класс ImprovedNormalMapDistribution.OutputPanel

Показать файл Открыть проект

Открытые методы

Метод Описание
OutputPanel ( IContainer container ) : System
SetAngles ( double _Phi, double _Theta ) : void
UpdateBitmap ( ) : void

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnPaint ( PaintEventArgs e ) : void
OnPaintBackground ( PaintEventArgs e ) : void
OnSizeChanged ( EventArgs e ) : void

Приватные методы

Метод Описание
ComputeIntersectionExact ( double _Phi, double _Theta, float &x, float &y ) : void
ComputeIntersectionExact ( float &x, float &y ) : void

Computes the intersection of the normal vector with the curve Z=(1-x²)(1-y²) using Newton-Raphson We can parametrize the Normal path as: x = Nx.t y = Ny.t z = Nz.t Injecting this in f(x,y) = (1-x²)(1-y²) we get: f(t) = (1-Nx².t²)(1-Ny².t²) To find the intersection with the normal we subtract Nz.t: f(t) = (1-Nx².t²)(1-Ny².t²) - Nz.t Expanding into: f(t) = Nx².Ny².t^4 - (Nx²+Ny²).t² - Nz.t + 1 And try to find the root f(t) = 0, we need the derivative of f(t): f'(t) = 4.Nx².Ny².t^3 - 2.(Nx²+Ny²).t - Nz.t We perform several iterations of the Newton-Raphson algorithm (http://en.wikipedia.org/wiki/Newton's_method): Starting from t0 = 0; t1 = t0 - f(t0) / f'(t0) t2 = t1 - f(t1) / f'(t1) etc. Until f(t) < epsilon ...

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

Transform ( float x, float y, PointF &_P ) : void

Описание методов

Dispose() защищенный Метод

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Результат void

OnPaint() защищенный Метод

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
Результат void

OnPaintBackground() защищенный Метод

protected OnPaintBackground ( PaintEventArgs e ) : void
e PaintEventArgs
Результат void

OnSizeChanged() защищенный Метод

protected OnSizeChanged ( EventArgs e ) : void
e EventArgs
Результат void

OutputPanel() публичный Метод

public OutputPanel ( IContainer container ) : System
container IContainer
Результат System

SetAngles() публичный Метод

public SetAngles ( double _Phi, double _Theta ) : void
_Phi double
_Theta double
Результат void

UpdateBitmap() публичный Метод

public UpdateBitmap ( ) : void
Результат void