Spatial Straight-Line Drawing Algorithm Based on Method of Discriminate Regions—A Control Algorithm of Motors

A novelty algorithm of spatial straight-line drawing based on a method of discriminate regions is proposed in this paper based on Bresenham’s algorithm. Three-dimensional space is divided into innumerable three-dimensional meshes according to the given rule; the distance between the start and the en...

Full description

Saved in:
Bibliographic Details
Published inEnergies (Basel) Vol. 13; no. 19; p. 5002
Main Authors Wang, Jianping, Xiao, Shiguang, Song, Tao, Yue, Junqi, Bian, Pingyan, Li, Yu
Format Journal Article
LanguageEnglish
Published Basel MDPI AG 01.10.2020
Subjects
Online AccessGet full text
ISSN1996-1073
1996-1073
DOI10.3390/en13195002

Cover

More Information
Summary:A novelty algorithm of spatial straight-line drawing based on a method of discriminate regions is proposed in this paper based on Bresenham’s algorithm. Three-dimensional space is divided into innumerable three-dimensional meshes according to the given rule; the distance between the start and the end points of the three coordinates is Δx, Δy, and Δz, respectively; the distribution types of spatial straight line and the position of the end point are determined by judging the relationship among Δx, Δy, and Δz; then, the active-passive directions can be determined. The plane of the ending point of the straight line in a three-dimensional mesh is divided into four regions; then, the discriminant is obtained; and this discriminant determine which region the point is located in The algorithm is verified and analyzed by the method of contrastive analysis; the results show that: the error of the algorithm is related to the step length L; the maximum theoretical error is 0.7071*L. The discriminants are all integers, so the problem of deviation from the theoretical straight line caused by the retention of decimals of significant digits can be avoided. Finally, the algorithm is applied to the cooperative control of multiple motors, and conversion between unit grid number and pulse number of motors is performed.
Bibliography:ObjectType-Article-1
SourceType-Scholarly Journals-1
ObjectType-Feature-2
content type line 14
ISSN:1996-1073
1996-1073
DOI:10.3390/en13195002