{'fraction_non_alphanumeric': 0.007858546168958742, 'fraction_numerical': 0.0, 'mean_word_length': 5.13855421686747, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Line Segments Approximation Algorithm of Grating Lines

A new fast line drawing algorithm that is different from the traditional Bresenham algorithm is presented in this paper. A line is treated as an aggregation of several line segments and the Y coordinate differences of candidate pixel points in every step of traditional algorithm are replaced by the length errors of each segments in this new algorithm. Each operation and judgment can generate a line segment by keeping the advantages of integer arithmetic and then the numbers of operating and output are decreased. Besides these, the skew-symmetric character is considered in the algorithm and the direct draw property without operation of some special lines is also pointed out. All of these characters are helpful to simplified the complexity of algorithm designing and increase line generation speed. Theoretical analysis shows the generation speed of the new algorithm are three times of the Bresenham algorithm with almost same complexity of designing.