Clipping: Line
Fix the Size of the Clipping Window: Set the parameters defining the boundaries of the clipping window using the values already filled in the input boxes.
Fix Line Coordinates: Enter or adjust the starting and ending coordinates of the line segment. Ensure these coordinates are set correctly to define the line you want to clip.
Proceed to the Experiment: Click on Submit to begin the experiment with the defined parameters for the clipping window and the line coordinates.
Navigate Through the Experiment:
- Use Next Iteration to advance through the Cohen-Sutherland algorithm steps:
- The algorithm will check if points are inside the clipping window
- Compute intersection points with window boundaries
- Draw the clipped line segments
- Use Previous Iteration to move back to the previous step, allowing you to review:
- The state of the line at each step
- Intersection points computed
- Clipping decisions made
- Use the Reset button to clear the current experiment and start new with default parameters
- Use Next Iteration to advance through the Cohen-Sutherland algorithm steps:
Monitor the Experiment Progress:
- Watch the Observations column on the right side for:
- Current step message explaining what's happening
- Logic text showing the current clipping operation
- Point status showing which point is being processed
- Line status showing which boundary is being checked
- Table showing coordinates of points and intersections
- Watch the Observations column on the right side for:
End of Experiment: Upon completion of the experiment, you can:
- Start a new experiment with different starting and ending coordinates for the line within the same clipping window
- Adjust the parameters of the clipping window to experiment with different clipping scenarios
- Review the final clipped line and all intermediate steps using the Previous Iteration button