Let us say we have a line AB (as shown in the image) and according to Cyrus Beck Line Clipping algorithm, C will be a potentially entering point and D will be a potentially leaving point. And ultimately the line segment AC and CD are clipped off and the line segment CD remains. But clearly its not true.

What is the issue here?

Any help would be highly appreciated!

enter image description here

  • $\begingroup$ When you say "clipped part", to me, that means a section that was removed, e.g. AC or DB. Further, although I don't recall the specifics of that clipping algorithm (i.e. Cyrus Beck), with convex clipping algorithms it is common to mark vertices as having clip flags - one flag per line that you are clipping against. So far you've 'clipped' against the left and right vertical lines, but if you were to get vals (i.e. dot products) of all the lines, and in particular the the top horizontal, the corresponding clip codes for vertices A and B would immediately eliminate the entirety of AB. $\endgroup$ – Simon F Mar 14 at 9:22

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.