In Cyrus-Beck algorithm for line clipping the value of t parameter is computed…

2014

In Cyrus-Beck algorithm for line clipping the value of t parameter is computed by the relation :

(Here P1 and P2 are the two end points of the line, f is a point on the boundary, n1 is inner normal)

  1. A.

    \(\frac{(P_{1}-f_{i}).n_{i}}{(P_{2}-P_{1}).n_{i}}\)

  2. B.

    \(\frac{(f_{i}-P_{1}).n_{i}}{(P_{2}-P_{1}).n_{i}}\)

  3. C.

    \(\frac{(P_{2}-f_{i}).n_{i}}{(P_{1}-P_{2}).n_{i}}\)

  4. D.

    \(\frac{(f_{i}-P_{2}).n_{i}}{(P_{1}-P_{2}).n_{i}}\)

Attempted by 77 students.

Show answer & explanation

Correct answer: B

Key idea: find the parameter t where the parametric line intersects the clipping boundary defined by point f_i and inward normal n_i.

  1. Write the parametric form of the line segment: P(t) = P1 + t (P2 - P1), where 0 ≤ t ≤ 1.

  2. Point P(t) lies on the clipping boundary when the vector from the boundary point to P(t) is orthogonal to the inward normal: (f_i - P(t)) · n_i = 0.

  3. Substitute P(t): (f_i - (P1 + t(P2 - P1))) · n_i = 0 → (f_i - P1) · n_i - t (P2 - P1) · n_i = 0.

  4. Solve for t: t = (f_i - P1) · n_i / (P2 - P1) · n_i.

  5. Notes: If (P2 - P1) · n_i = 0 the line is parallel to the boundary; if the numerator is also zero the line lies on the boundary. The sign of the denominator helps determine entering versus leaving intersections.

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…