2d Composite Transformation Program In Computer Graphics Using C
If a point (x, y, z) is rotated through angle θ about x – axis to a new point (x’, y’, z’) then the new point is calculated as y’ = y cosθ – z sinθ z’ = y sinθ + z cosθ x’ = x About y – axis z’ = z cosθ – x sinθ x’ = z sinθ + x cosθ y’ = y About z – axis x’ = x cosθ – y sinθ y’ = x sinθ + y cosθ z’ = z Scaling Scaling with respect a selected fixed position (xf, yf, zf) can be represented with the following transformation sequence: 1. Translate the fixed point to the origin 2. Scale the object relative to the coordinate origin 3. Translate the fixed point back to its original position The equations for this sequence of transformation is (where s is scaling factor) x’ = x * s + (1 – s) * xf y’ = y *s + (1 – s) * yf z’ = z * s + (1 – s) * zf Source Code.
C Program for 2D transformations such as translation, scaling, and rotation on 2D object. Mohanraj 6 comments. To perform 2D transformations such as translation, scaling, and rotation on 2D object. ALGORITHM: 1. Reset chip fix generator samsung clp 325. Initialize the graphics mode.