为了解决基于网格技术的图形排列算法在处理可变尺寸图形排列问题上的局限性,基于几何变换思想,建立了有界平面上图形自适应排列的数学模型,并证明了其正确性,进而提出了基于坐标变换的图形自适应排列算法。此算法用图形平移变换方式代替网格划分方法在有界视图上部署图形元素,其时间复杂性为O(N)。最后将所获得的算法应用到面向中央空调节能控制的软PLC系统上。基于九类指令图形、三类测试案例的测试结果表明,算法能以较低的CPU占用率实现图形有序排列的效果,具有较高的运行速率与稳定性。
To address limitations of grid-based graphical layout algorithm to arrange the element of the graphic with different size, this paper established a kind of graphic adaptive layout mathematical model on a bounded plane by employing geometric transformation, and proved its correctness. Applying the mathematical model, it proposed an adaptive graphics layout algo- rithm based on coordinate transformation (AGLA-CT), which was used to distribute graphical elements on the bounded plane by adopting translation transformation approach instead of grid division method and had a time complexity of O(N). AGLA-CT applied to a soft programmable logic controller system developed for the energy-saving control of central air conditioning, and the nine kinds of instructions and three cases were used for the test. The testing results illustrate that it is promising to achieve the anticipated results of graphical elements layout characterised with high run rate, stability, and small resources occupation rate.