diff --git a/src/lab/exp/Experiment.html b/src/lab/exp/Experiment.html index d6c9988f6..a06bb047a 100644 --- a/src/lab/exp/Experiment.html +++ b/src/lab/exp/Experiment.html @@ -1,7 +1,4 @@ - - - - + @@ -39,7 +36,7 @@ - + @@ -48,18 +45,18 @@
Until AET and ET are non empty -
-

+
+

@@ -166,52 +161,45 @@

Pseudo Code of the algorithm

- - + + @@ -221,4 +210,5 @@

}); - + + \ No newline at end of file diff --git a/src/lab/exp2/Procedure.html b/src/lab/exp2/Procedure.html index 6c80b37fa..bb4ffad1c 100644 --- a/src/lab/exp2/Procedure.html +++ b/src/lab/exp2/Procedure.html @@ -1,6 +1,4 @@ - - - + @@ -23,7 +21,7 @@ - + @@ -40,7 +38,7 @@ - + @@ -56,16 +54,16 @@ --> @@ -79,7 +77,7 @@
-
+

@@ -87,13 +85,11 @@ -
-

Computer Science & EngineeringComputer Graphics →List Of Experiments

+
+

Computer Science & EngineeringComputer Graphics →List Of Experiments

- +
@@ -126,52 +122,45 @@

Transformations: Translation

-
+ -
+ -
+ -
+

Follow us

- - - - - + + + + +
@@ -180,10 +169,10 @@

- - + + @@ -234,4 +223,5 @@

}); - + + \ No newline at end of file diff --git a/src/lab/exp2/Quizzes.html b/src/lab/exp2/Quizzes.html index 450c98f7e..b47b1bbb9 100644 --- a/src/lab/exp2/Quizzes.html +++ b/src/lab/exp2/Quizzes.html @@ -1,6 +1,4 @@ - - - + @@ -23,7 +21,7 @@ - + @@ -40,7 +38,7 @@ - +

@@ -56,16 +54,16 @@ --> @@ -79,7 +77,7 @@
-
+

@@ -87,13 +85,11 @@ -
-

Computer Science & EngineeringComputer Graphics →List Of Experiments

+
+

Computer Science & EngineeringComputer Graphics →List Of Experiments

- +
@@ -102,57 +98,57 @@

Transformations: Translation

-Matrix( (1,0,0,5), (0,1,0,-3), (0,0,1,6), (0,0,0,1) ) +Matrix( (1,0,0,5), (0,1,0,-3), (0,0,1,6), (0,0,0,1) ) Q1. - When the following translation matrix is applied to point (10,10,10), it becomes
-    - (5,7,4)
-    - (15,7,16)
-    - (15,7,4)
-    + When the following translation matrix is applied to point (10,10,10), it becomes
+    + (5,7,4)
+    + (15,7,16)
+    + (15,7,4)
+    (15,13,16) -

+

Q2. - If the point (-10,14,20) is translated according to the vector (-10,2,8), it becomes
-    - (-20,16,28)
-    - (0,16,28)
-    - (0,16,12)
-    + If the point (-10,14,20) is translated according to the vector (-10,2,8), it becomes
+    + (-20,16,28)
+    + (0,16,28)
+    + (0,16,12)
+    (-20,16,12) -

+

Q3. - Identify the translation vector v which transforms point A (1,1,5) to point B (-11,13,-7).
-    - (12,-12,12)
-    - (-12,12,12)
-    - (-12,12,-12)
-    + Identify the translation vector v which transforms point A (1,1,5) to point B (-11,13,-7).
+    + (12,-12,12)
+    + (-12,12,12)
+    + (-12,12,-12)
+    (-12,-12,-12) -

+

Q4. - If the Origin is at (0,0,0) then a translation of (2,5,-4) translates the origin to:
-    - (2,5,-4)
-    - (2,5,4)
-    - (-2,5,4)
-    + If the Origin is at (0,0,0) then a translation of (2,5,-4) translates the origin to:
+    + (2,5,-4)
+    + (2,5,4)
+    + (-2,5,4)
+    (-2,-5,4) -

+

- - + +

@@ -168,52 +164,45 @@

Transformations: Translation

-
+ -
+ -
+ -
+

Follow us

- - - - - + + + + +
@@ -222,10 +211,10 @@

- - + + @@ -276,4 +265,5 @@

}); - + + \ No newline at end of file diff --git a/src/lab/exp2/Theory.html b/src/lab/exp2/Theory.html index 076778881..7418a564e 100644 --- a/src/lab/exp2/Theory.html +++ b/src/lab/exp2/Theory.html @@ -1,6 +1,4 @@ - - - + @@ -23,7 +21,7 @@ - + @@ -40,7 +38,7 @@ - +

@@ -56,16 +54,16 @@ --> @@ -79,7 +77,7 @@
-
+

@@ -87,13 +85,11 @@ -
-

Computer Science & EngineeringComputer Graphics →List Of Experiments

+
+

Computer Science & EngineeringComputer Graphics →List Of Experiments

- +
@@ -102,11 +98,11 @@

Transformations: Translation

+Translation Matrix

On multiplication with a vector, the expected result of vector addition is obtained:

-Matrix representation for Point translation +Matrix representation for Point translation

Transformations can be interpreted as the modification of a co-ordinate system, keeping the points constant, effectively changing their relative positions. Thus, a translation of (2,3) translates the co-ordinate system's origin to (-2,-3), effectively translating all points with respect to this co-ordinate system.

@@ -122,52 +118,45 @@

Transformations: Translation

-
+ -
+ -
+ -
+

Follow us

- - - - - + + + + +
@@ -177,10 +166,10 @@

- - + + @@ -231,4 +220,5 @@

}); - + + \ No newline at end of file diff --git a/src/lab/exp2/template1.html b/src/lab/exp2/template1.html index 9020f790d..256cf171b 100644 --- a/src/lab/exp2/template1.html +++ b/src/lab/exp2/template1.html @@ -1,6 +1,4 @@ - - - + @@ -23,7 +21,7 @@ - + @@ -40,7 +38,7 @@ - +

@@ -49,23 +47,23 @@ @@ -79,7 +77,7 @@
-
+

@@ -87,13 +85,11 @@ -
+

Disciplines and Domains

- +
@@ -110,35 +106,35 @@

D

- - + + @@ -226,4 +215,5 @@

}); - + + \ No newline at end of file diff --git a/src/lab/exp7/Quizzes.html b/src/lab/exp7/Quizzes.html index 70f70305d..6c219feed 100644 --- a/src/lab/exp7/Quizzes.html +++ b/src/lab/exp7/Quizzes.html @@ -1,6 +1,4 @@ - - - + @@ -23,7 +21,7 @@ - + @@ -40,7 +38,7 @@ - +

@@ -56,16 +54,16 @@ --> @@ -79,7 +77,7 @@
-
+

@@ -87,13 +85,11 @@ -
-

Computer Science & EngineeringComputer Graphics →List Of Experiments

+
+

Computer Science & EngineeringComputer Graphics →List Of Experiments

- +
@@ -102,15 +98,15 @@

Clipping : Line

-

    -
  1. Which of the following conditions should hold for a line to completely be inside the clip window (code for end point 1 is c1 and for end point 2 is c2) :
    +

      +
    1. Which of the following conditions should hold for a line to completely be inside the clip window (code for end point 1 is c1 and for end point 2 is c2) :
      1. c1 OR c2 = 0
      2. c1 AND c2 = 0
      3. c1 EXOR c2 = 1
      4. c1 OR c2 = 1
    2. -
    3. Which of the following conditions should hold for a line to be trivially rejected (code for end point 1 is c1 and for end point 2 is c2) :
      +
    4. Which of the following conditions should hold for a line to be trivially rejected (code for end point 1 is c1 and for end point 2 is c2) :
      1. c1 AND c2 = 0
      2. c1 AND c2 != 0
      3. @@ -123,9 +119,9 @@

        Clipping : Line

        - +

        + +
        @@ -143,52 +139,45 @@

        Clipping : Line

        -
        + -
        + -
        + -
        +

        Follow us

        - - - - - + + + + +
        @@ -198,10 +187,10 @@

        - - + + @@ -252,4 +241,5 @@

        }); - + + \ No newline at end of file diff --git a/src/lab/exp7/Theory.html b/src/lab/exp7/Theory.html index d5d3272fe..cbf14b2d8 100644 --- a/src/lab/exp7/Theory.html +++ b/src/lab/exp7/Theory.html @@ -1,6 +1,4 @@ - - - + @@ -23,7 +21,7 @@ - + @@ -40,7 +38,7 @@ - +

        @@ -58,16 +56,16 @@ --> @@ -81,7 +79,7 @@
        -
        +

        @@ -89,33 +87,30 @@ -
        -

        Computer Science & EngineeringComputer Graphics →List Of Experiments

        +
        +

        Computer Science & EngineeringComputer Graphics →List Of Experiments

        - +

        Clipping : Line

        -

        Cohen Sutherland's Line Clipping Algorithm

        +

        Cohen Sutherland's Line Clipping Algorithm

        Pseudo Code of the algorithm

        - Input : Two Endpoints of the line, (x0, y0) & (x1, y1).
        Two opposite corner points of the frame buffer.
        + Input : Two Endpoints of the line, (x0, y0) & (x1, y1).
        Two opposite corner points of the frame buffer.
        Steps of the Algorithm -
        -
          +
          1. P0 = (x0, y0) & P1(x1, y1).
          2. Compute the 4-bit codes for each endpoint. The codes of the vertices are computed from the below figure : - +
            Source : From Academic Tutorials
            -0000 represents the clip window and all other areas outside are to be clipped.
            +0000 represents the clip window and all other areas outside are to be clipped.
            If both codes are 0000,(bitwise OR of the codes yields 0000 ) line lies completely inside the window: pass the endpoints to the draw routine. If both codes have a 1 in the same bit position (bitwise AND of the codes is not 0000), the line lies outside the window. It can be trivially rejected.
          3. If a line cannot be trivially accepted or rejected, at least one of the two endpoints must lie outside the window and the line segment crosses a window edge. This line must be clipped at the window edge before being passed to the drawing routine.
          4. @@ -123,8 +118,8 @@

            Pseudo Code of the algorithm

          5. When a set bit (1) is found, compute the intersection I of the corresponding window edge with the line from P0 to P1. Replace P0 with I and repeat the algorithm.
        -
        -

        +
        +

        @@ -137,52 +132,45 @@

        Pseudo Code of the algorithm

@@ -117,52 +113,45 @@

Clipping : Polygon

-
+ -
+ -
+ -
+

Follow us

- - - - - + + + + +
@@ -172,10 +161,10 @@

- - + + @@ -226,4 +215,5 @@

}); - + + \ No newline at end of file diff --git a/src/lab/exp8/Introduction.html b/src/lab/exp8/Introduction.html index f1a73cd24..eab6cae96 100644 --- a/src/lab/exp8/Introduction.html +++ b/src/lab/exp8/Introduction.html @@ -1,6 +1,4 @@ - - - + @@ -23,7 +21,7 @@ - + @@ -40,7 +38,7 @@ - +

@@ -56,16 +54,16 @@ --> @@ -79,7 +77,7 @@
-
+

@@ -87,13 +85,11 @@ -
-

Computer Science & EngineeringComputer Graphics →List Of Experiments

+
+

Computer Science & EngineeringComputer Graphics →List Of Experiments

- +
@@ -103,15 +99,15 @@

Clipping : Polygon

+

  1. Sutherland-Hodgeman algorithm
  2. Wiler-Atherton algorithm
Here we have discussed only the Sutherland-Hodgeman Polygon Clipping algorithm. -

+

@@ -124,52 +120,45 @@

Clipping : Polygon

-
+ -
+ -
+ -
+

Follow us

- - - - - + + + + +
@@ -179,10 +168,10 @@

- - + + @@ -233,4 +222,5 @@

}); - + + \ No newline at end of file diff --git a/src/lab/exp8/Manual.html b/src/lab/exp8/Manual.html index b56c2daca..0cd7ef3a5 100644 --- a/src/lab/exp8/Manual.html +++ b/src/lab/exp8/Manual.html @@ -1,6 +1,4 @@ - - - + @@ -23,7 +21,7 @@ - + @@ -40,7 +38,7 @@ - +

@@ -56,16 +54,16 @@ --> @@ -79,7 +77,7 @@
-
+

@@ -87,13 +85,11 @@ -
-

Computer Science & EngineeringComputer Graphics →List Of Experiments

+
+

Computer Science & EngineeringComputer Graphics →List Of Experiments

- +
@@ -117,52 +113,45 @@

Clipping : Polygon

-
+ -
+ -
+ -
+

Follow us

- - - - - + + + + +
@@ -172,10 +161,10 @@

- - + + @@ -226,4 +215,5 @@

}); - + + \ No newline at end of file diff --git a/src/lab/exp8/Objective.html b/src/lab/exp8/Objective.html index f8ffb2ee8..c0e102b45 100644 --- a/src/lab/exp8/Objective.html +++ b/src/lab/exp8/Objective.html @@ -1,6 +1,4 @@ - - - + @@ -23,7 +21,7 @@ - + @@ -40,7 +38,7 @@ - +

@@ -56,16 +54,16 @@ --> @@ -79,7 +77,7 @@
-
+

@@ -87,13 +85,11 @@ -
-

Computer Science & EngineeringComputer Graphics →List Of Experiments

+
+

Computer Science & EngineeringComputer Graphics →List Of Experiments

- +
@@ -115,52 +111,45 @@

Clipping : Polygon

-
+ -
+ -
+ -
+

Follow us

- - - - - + + + + +
@@ -170,10 +159,10 @@

- - + + @@ -224,4 +213,5 @@

}); - + + \ No newline at end of file diff --git a/src/lab/exp8/Procedure.html b/src/lab/exp8/Procedure.html index 313f8f234..fcb6869b7 100644 --- a/src/lab/exp8/Procedure.html +++ b/src/lab/exp8/Procedure.html @@ -1,6 +1,4 @@ - - - + @@ -23,7 +21,7 @@ - + @@ -40,7 +38,7 @@ - +

@@ -56,16 +54,16 @@ --> @@ -79,7 +77,7 @@
-
+

@@ -87,24 +85,22 @@ -
-

Computer Science & EngineeringComputer Graphics →List Of Experiments

+
+

Computer Science & EngineeringComputer Graphics →List Of Experiments

- +

Clipping : Polygon

    -
  1. Fix the clipping window (the default parameters are already filled in the input boxes) and then click on Enter.
    +
  2. Fix the clipping window (the default parameters are already filled in the input boxes) and then click on Enter.
    You can also proceed directly to the experiment using the default parameters of the clipping window and the vertices of a polygon, by clicking on Start Experiment with Default Values.
  3. -
  4. Enter the vertices of the polygon in the input box.
    - Let, (x1, y1), (x2, y2), (x3, y3), (x4, y4), (x5, y5)
    represent the vertices of the polygon in order, i.e., the 1st vertex is connected to the 2nd and 2nd to the 3rd and so on. The last vertex is connected to the 1st to complete the polygon.
    - The default vertices are already filled in the input boxes. Once you have finalized the coordinates, you can click on Start Experiment to begin with the experiment.
    +
  5. Enter the vertices of the polygon in the input box.
    + Let, (x1, y1), (x2, y2), (x3, y3), (x4, y4), (x5, y5)
    represent the vertices of the polygon in order, i.e., the 1st vertex is connected to the 2nd and 2nd to the 3rd and so on. The last vertex is connected to the 1st to complete the polygon.
    + The default vertices are already filled in the input boxes. Once you have finalized the coordinates, you can click on Start Experiment to begin with the experiment.
    You can also go Back to change the values of the frame buffer.
  6. Throughout the experiment, you can click on Next Iteration to go to the next step of the algorithm.
  7. Once the experiment ends, you can again experiment with a new set of vertices of the polygon.
  8. @@ -121,52 +117,45 @@

    Clipping : Polygon

    -
    + -
    + -
    + -
    +

    Follow us

    - - - - - + + + + +
    @@ -176,10 +165,10 @@

    - - + + @@ -230,4 +219,5 @@

    }); - + + \ No newline at end of file diff --git a/src/lab/exp8/Quizzes.html b/src/lab/exp8/Quizzes.html index 37517ac69..8001c2c84 100644 --- a/src/lab/exp8/Quizzes.html +++ b/src/lab/exp8/Quizzes.html @@ -1,6 +1,4 @@ - - - + @@ -23,7 +21,7 @@ - + @@ -40,7 +38,7 @@ - +

    @@ -56,16 +54,16 @@ --> @@ -79,7 +77,7 @@
    -
    +

    @@ -87,21 +85,19 @@ -
    -

    Computer Science & EngineeringComputer Graphics →List Of Experiments

    +
    +

    Computer Science & EngineeringComputer Graphics →List Of Experiments

    - +

    Clipping : Polygon

    -

      -
    1. The Sutherland Hodgeman works for the following cases :
      +

        +
      1. The Sutherland Hodgeman works for the following cases :
        1. Convex Polygon with convex clip window
        2. Concave polygon with convex clip window
        3. @@ -110,7 +106,7 @@

          Clipping : Polygon

        4. Yes
        5. No
        6. @@ -124,7 +120,7 @@

          Clipping : Polygon

          Clipping : Polygon

-
+ -
+ -
+ -
+

Follow us

- - - - - + + + + +
@@ -192,10 +181,10 @@

- - + + @@ -246,4 +235,5 @@

}); - + + \ No newline at end of file diff --git a/src/lab/exp8/Theory.html b/src/lab/exp8/Theory.html index f10025061..4e5e4c5b0 100644 --- a/src/lab/exp8/Theory.html +++ b/src/lab/exp8/Theory.html @@ -1,6 +1,4 @@ - - - + @@ -23,7 +21,7 @@ - + @@ -40,7 +38,7 @@ - +

@@ -56,16 +54,16 @@ --> @@ -79,7 +77,7 @@
-
+

@@ -87,41 +85,38 @@ -
-

Computer Science & EngineeringComputer Graphics →List Of Experiments

+
+

Computer Science & EngineeringComputer Graphics →List Of Experiments

- +

Clipping : Polygon

-

Sutherland Hodgeman's Polygon Clipping Algorithm

+

Sutherland Hodgeman's Polygon Clipping Algorithm

Pseudo Code of the algorithm

- Input : Vertices of the polygon, (xi, yi) ∀i = {1, 2, ..., n} for n vertices in the polygon and the coordinates of the opposite corners of the clipped window.
+ Input : Vertices of the polygon, (xi, yi) ∀i = {1, 2, ..., n} for n vertices in the polygon and the coordinates of the opposite corners of the clipped window.
Steps of the Algorithm -
-for each of the four boundaries of the clipped window
- for each edge eiin the polygon
- Pi = (xi, yi) & Pi+1 = (xi+1, yi+1) represent the two vertices of edge ei.
- if Pi & Pi+1 both lie outside the clipping area
- then no point is written
- else if Pi & Pi+1 both lie inside the clipping area
- then Pi is written into the points of clipped polygon
- else if Pi is inside and Pi+1 is outside
- then Pi is written into the points of clipped polygon and we calculate the intersection of ei with the concerned boundary and the point of intersection is written into the points of clipped polygon.
- else
- then Pi+1 is written into the points of clipped polygon and we calculate the intersection of ei with the concerned boundary and the point of intersection is written into the points of clipped polygon.
+
for each of the four boundaries of the clipped window
+ for each edge eiin the polygon
+ Pi = (xi, yi) & Pi+1 = (xi+1, yi+1) represent the two vertices of edge ei.
+ if Pi & Pi+1 both lie outside the clipping area
+ then no point is written
+ else if Pi & Pi+1 both lie inside the clipping area
+ then Pi is written into the points of clipped polygon
+ else if Pi is inside and Pi+1 is outside
+ then Pi is written into the points of clipped polygon and we calculate the intersection of ei with the concerned boundary and the point of intersection is written into the points of clipped polygon.
+ else
+ then Pi+1 is written into the points of clipped polygon and we calculate the intersection of ei with the concerned boundary and the point of intersection is written into the points of clipped polygon.
-
-

+
+

@@ -134,52 +129,45 @@

Pseudo Code of the algorithm