The invention discloses a matching algorithm for multi-point simultaneous rendering, which relates to the field of algorithm rendering. The invention comprises the following steps: S01: obtaining coordinate pairs and logarithms; S02: judging whether the current logarithm newDstLen and the last logarithm oldDstLen are zero; S08; S03: judging the size between the current logarithm newDstLen and the last logarithm oldDstLen; S04 if the current logarithm newDstLen is larger than the last logarithm DstLen; S04: judging whether the current logarithm newDstLen is zero or not; When ewDstLen is smaller than the previous logarithm oldDstLen, it executes S06; S04: allocate threads according to coordinates; S05: close the corresponding threads according to the number of redundant threads; S06: allocate coordinates according to threads; S07: open the corresponding threads according to the logarithm of redundant coordinates; S08: start drawing. The method matches the obtained coordinate points to the corresponding drawing threads by rotation training, and operates each drawing thread independently, so that the threads can open when drawing and close when not drawing, thus reducing the error rate and improving the drawing efficiency.
【技术实现步骤摘要】
一种多点同时绘制的匹配算法
本专利技术属于绘制算法领域,特别是涉及一种多点同时绘制的匹配算法。
技术介绍
为了节省绘制时间,市面上的绘制大多采用十点同时绘制,但计算机在绘制的过程中,不同点的绘制往往存在一定的影响,当计算机在绘制的过程中,出现个别的坐标点丢失计算机会导致出现交叉的情况,不仅影响到了绘制的正确性,还严重影响到了绘制的效率。基于上诉问题,本专利技术在实现市面上十点同时绘制的同时,每个绘制点都有相应的绘制线程来单独操作,将坐标点轮训匹配到相应的绘制线程来提高绘制效率。
技术实现思路
本专利技术的目的在于提供一种多点同时绘制的匹配算法,通过轮训的方式将得到的坐标点匹配到相应的绘制线程,将每个绘制线程单独操作,使线程能够在绘制的时候打开,不绘制的时候关闭,解决了现有的绘制因某个坐标丢失造成的绘制断开、出错率高和效率低的问题。为解决上述技术问题,本专利技术是通过以下技术方案实现的:本专利技术为一种多点同时绘制的匹配算法,包括如下步骤:步骤S01获取坐标对和对数;步骤S02判断当前对数newDstLen与上一次对数oldDstLen是否均为零;若是,则执行步骤S08;若否,则执行步骤S03;步骤S03判断当前对数newDstLen与上一次对数oldDstLen之间的大小;若当前对数newDstLen大于上一次对数oldDstLen,则执行步骤S04;若当前对数newDstLen小于上一次对数oldDstLen,则执行步骤S06;步骤S04根据坐标分配线程;步骤S05根据多余的线程数,关闭相应的线程;步骤S06根据线程分配坐标;步骤S07根据多余的坐标对数,开 ...
【技术保护点】
1.一种多点同时绘制的匹配算法,其特征在于,包括如下步骤:步骤S01获取坐标对和对数;步骤S02判断当前对数newDstLen与上一次对数oldDstLen是否均为零;若是,则执行步骤S08;若否,则执行步骤S03;步骤S03判断当前对数newDstLen与上一次对数oldDstLen之间的大小;若当前对数newDstLen大于上一次对数oldDstLen,则执行步骤S04;若当前对数newDstLen小于上一次对数oldDstLen,则执行步骤S06;步骤S04根据坐标分配线程;步骤S05根据多余的线程数,关闭相应的线程;步骤S06根据线程分配坐标;步骤S07根据多余的坐标对数,开启相应的线程;步骤S08开始绘制。
【技术特征摘要】
1.一种多点同时绘制的匹配算法,其特征在于,包括如下步骤:步骤S01获取坐标对和对数;步骤S02判断当前对数newDstLen与上一次对数oldDstLen是否均为零;若是,则执行步骤S08;若否,则执行步骤S03;步骤S03判断当前对数newDstLen与上一次对数oldDstLen之间的大小;若当前对数newDstLen大于上一次对数oldDstLen,则执行步骤S04;若当前对数newDstLen小于上一次对数oldDstLen,则执行步骤S06;步骤S04根据坐标分配线程;步骤S05根据多余的线程数,关闭相应的线程;步骤S06根据线程分配坐标;步骤S07根据多余的坐标对数,开启相应的线程;步骤S08开始绘制。2.根据权利要求1所述的一种多点同时绘制的匹配算法,其特征在于,所述步骤S05中,关闭线程采取延时缓冲关闭,具体延迟缓冲关闭流程如下:步骤T01接收坐标点;步骤T02线程匹配算法,开始绘制;步骤T03根据线程缓冲时间判断信号是否为关闭信号;若是,则关闭线程;若否,信号为复活信号,则继续执行步骤...
【专利技术属性】
技术研发人员:林传文,汪俊锋,薛东阳,张巧云,
申请(专利权)人:安徽慧视金瞳科技有限公司,
类型:发明
国别省市:安徽,34
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。