Page: Window - Viewport Transformation
0

enter image description here

$\frac{\left\{x_{v}-x_{v \min }\right\}}{\left\{x_{v \max }-\left\{x_{v \min }\right\}\right.}=\frac{\left\{x_{w}-x_{w \min }\right\}}{\left\{x_{w \max }-x_{w \min }\right\}}$\

$x_{v}-x_{v \min }=\frac{\left\{x_{v \max }-x_{v \min }\right\}}{\left\{x_{w \max }-x_{w \min }\right\}} \cdot x_{w}-x_{w \min }$

$x_{v}-x_{v m i n}=S_{x}\left[x_{w}-x_{w m i n}\right]$

Diagram

$x_{v}=S_{x} x_{w}-S_{x} x_{w \min }+X_{v \min }$

$x_{v}=S_{x} x_{w}-\left[\frac{\left\{x_{v \max }-x_{v m i n}\right\}}{\left\{x_{w \max }-x_{w \min }\right\}}\right] \cdot x_{w \min }+x_{v \min } \times \frac{\left\{x_{w \max }-x_{w \min }\right\}}{\left\{x_{w \max }-x_{w \min }\right\}}$

$x_{v}=s_{x} x_{w}+\left[\frac{\left\{x_{v \max } \cdot x_{w \min }+x_{v \min } \cdot x_{w \min }\right\}}{\left\{x_{w \max }-x_{w \min }\right\}}\right]+\left[\frac{\left\{x_{w \max } \cdot x_{v \min }-x_{w \min } \cdot x_{v \min }\right\}}{\left\{x_{w \max }-x_{w \min }\right\}}\right]$

Similarly,

$x_{v}=s_{x} x_{w}+t_{x}$

$y_{v}=s_{y} y_{w}+t_{y}$

Where,

$S_x$ & $S_y$ are scaling factor

$s_{x}=\frac{\left\{x_{v \max }-x_{v \min }\right\}}{\left\{x_{w \max }-x_{w \min }\right\}}$

$s_{y}=\frac{\left\{y_{v \max }-y_{v \min }\right\}}{\left\{y_{w \max }-y_{w \min }\right\}}$

$t_x, t_y$ are translation factor

Curves:

enter image description here

3) Parametric

$\mathrm{P}(\mathrm{t})=\mathrm{f}(\mathrm{x}) \cdot \mathrm{f}(\mathrm{y})$

$x^{2}+y^{2}=R^{2}$

$x^{2}+y^{2}-R^{2}=0$

$\mathrm{f}(\mathrm{x}, \mathrm{y})=0$

Spline Curve (Cubic n= 3)

$P(t)=\sum_{i=0}^{n} C_{i} t^{i} \quad \quad \mathrm{n}=1$

$P(t)=P_{0}(1-t)+P_{1} t$

$\quad \quad =\left[P_{0} P_{1}\right][(1-t)]$

$\quad \quad =P_{0} C_{1}$

enter image description here

$P(0)=C_{0}$

$P(1)=C_{0}+C_{1}$

$P(1)=P_{0}+C_{1}$

$C_{1}=P_{1}-P_{0}$

$\begin{aligned} P(t) &=P_{0}+\left(P_{1}-P_{0}\right) t \\ &=P_{0}(1-t)+P_{1} t \\ &=\left[P_{0} \quad P_{1}\right][(1-t)] \\ P(t) &=\left[P_{0} \quad P_{1}\right]\left[\begin{array}{cc}{-1} & {1} \\ {1} & {0}\end{array}\right] (\frac{t}{1}) \end{aligned}$

ADD COMMENTlink
modified 10 hours ago by gravatar for Snehal Bhise Snehal Bhise ♦♦ 10 written 8 days ago by gravatar for Ankit Pandey Ankit Pandey70
Please log in to add an answer.