The non-zero surround principle in the canvas and the canvas zero surround Principle

Source: Internet
Author: User

The non-zero surround principle in the canvas and the canvas zero surround Principle

Non-zero surround principle:
If you need to determine whether a region needs to be filled with color, select a random point from the region.

Pull a straight line from this point and be sure to pull it out of the graph. At this time, the point is the center of the circle.
The line that passes through the pulled straight line. If it is clockwise, it is recorded as + 1. If it is counterclockwise,
It is recorded as-1. The result of the final view of the sum. If it is 0, it will not be filled. If it is non-zero, it will be filled.

My opinion: the above judgment is too difficult. My opinion:

Non-zero surround principle: determines whether to fill the canvas when filling.

Draw a line out of the area to determine the fill, and pull it out of the image. This line is the Auxiliary Line.

Determine whether the drawn line is from the left side of the guides to the right side of the guides. At this time, this method is recorded as + 1.
If it is from the right side of the guides to the left side of the guides, remember-1.
Finally, the number of all records is summed. If the result of the sum is 0, this area is not filled; otherwise, it must be filled.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.