# 2020亚太数学建模竞赛A题翻译

## 激光标记阴影轮廓生成

Laser is an important invention in the 20th century, and it is called “the sharpest knife”, “the
most accurate ruler” and “the most unearthly light”. Laser has been increasingly applied to
industrial processing, which can be employed in various processing operations such as marking,
welding, drilling, cutting, heat treatment, and spray-coating. Remarkably featured by its fine
directionality, laser can be converged into tiny sized spots so as to achieve the high
centralization of energy; moreover, due to its sound monochromaticity, laser is easy to control.

Laser marking means using laser to mark LOGO, characters, symbols, images, etc. on the
surface of products. It is a widely used processing method with its advantages of high
processing efficiency, non-contact operation, no consumables, slight influences on product
surface deformation, and firmness of marked content.

The hatch tool of laser marking machine can be used to hatch specified 2D-compound curve
graph, and the setting of different hatch parameters have a great impact on the processing effects
of different materials. The direction parallel hatch and the contour parallel hatch are two basic
ways of hatching. The direction parallel hatch, also known as “zigzag” hatch, has paths being
moved along line segments which are parallel to an initially selected reference direction. Based
on this strategy a connected paths is obtained by linking these parallel segments so that they are
either all traversed from right to left (or left to right) or, alternately from left to right and from
right to left. Whereas the contour parallel hatch uses offset segments base the boundary curves
as smooth hatch path that similar to the boundary curve. Thus, the contour parallel hatch be
generated in a spiral-like fashion along curves that are at constant distances from the curve
boundary. Which type of hatch is applied in practice highly depending on mark materials and
the process effects on the particular machining task to be performed.

The hatching entities must be closed curvilinear polygons, and multiple mutually-nested contour objects may be filled by group-hatching. For the hatching process of figures, the existing boundary contours shall be offseted inward or outward firstly according to edge distance, before getting subject to the zigzag parallel or contour parallel hatch. The hatch curves shall be even and regular, and be kept basically parallel to each other. Neither having omissions of filling in an area, nor repeated filling of the area is allowed. The hatching by laser marking shall generate hatched contours online in a real-time way. To meet the requirement of high-efficiency laser marking, the hatch curves should stay parallel to the figures’ boundary lines, distribute evenly to the greatest extent, and be generated automatically and quickly. Efficiency is an important indicator for the generation of hatched figures.

Please research the characteristics of the figures subject using zigzag parallel and contour
parallel hatch, establish the mathematical model of hatching, design the algorithm, discuss the
efficiency of algorithm, and answer the following questions:

1. Realize the zigzag parallel and contour parallel hatch of the single-layer contour pattern in
Attachment 1; and here, only the hatch in horizontal direction (0° degree) is considered for
zigzag parallel hatch. Please realize the hatching under two groups of input parameters
according to the coordinate points data of the figure in Attachment 1 (unit: mm):

1.实现附件1单层轮廓图案的之字形平行和轮廓平行阴影；这里，只有水平方向(0度)的阴影被认为是之字形平行阴影。请根据附件1中图的坐标点数据(单位:mm)，实现两组输入参数下的填充:

(1) Internal contraction of boundary distance 1mm, hatch line spacing 1mm;

(1)边界距离内部收缩1毫米，影线间距1毫米；

(2) Internal contraction of boundary distance 0.1mm, hatch line spacing 0.1mm.
Under the two groups of parameters, calculate the total length of hatching lines of the hatched
curves subject of zigzag parallel and contour parallel hatch, and count the number of horizontal
lines of zigzag parallel hatch, and the number of circles of contour parallel hatch. Count the
average elapsed time (unit: ms) based on the multiple runs of hatching program, and calculate
the ratio of elapsed time for program running under conditions of parameter groups (2) and (1).

(2)边界距离内缩0.1mm，影线间距0.1mm，在两组参数下，计算之字形平行影线和轮廓平行影线的影线主体的影线总长度，统计之字形平行影线的水平线数，轮廓平行影线的圈数。根据填充程序的多次运行计算平均运行时间(单位:毫秒)，并计算参数组(2)和(1)条件下程序运行的运行时间比率。

1. Realize zigzag parallel and contour parallel hatch of the mutually nested multi-layer contour
patterns in Attachment 2; and here, only the hatching in horizontal direction (0° degree) is
considered for zigzag parallel hatch. Please realize the hatching under two groups of input
parameters according to the coordinate points data of the figure in Attachment 2 (unit: mm):

2.实现附件2中相互嵌套的多层轮廓图案的之字形平行和轮廓平行阴影；这里，对于之字平行阴影，只考虑水平方向(0度)的阴影。请根据附件2中图的坐标点数据(单位:mm)，实现两组输入参数下的填充:

(1) Internal contraction of boundary distance 1mm, hatch line spacing 1mm;

(1)边界距离内部收缩1毫米，影线间距1毫米；

(2) Internal contraction of boundary distance 0.1mm, hatch line spacing 0.1mm.

(2)边界距离内部收缩0.1毫米，影线间距0.1毫米

Under the two groups of parameters, calculate the total length of hatching lines of the hatched
curves subject to zigzag parallel and contour parallel hatch , and count the number of horizontal
lines of zigzag parallel hatch, and the number of circles of contour parallel hatch. Count the
average elapsed time (unit: ms) based on the multiple runs of hatching program, and calculate
the ratio of elapsed time for program running under conditions of parameter groups (2) and (1).

1. The diameter of light spots is very small when generated from laser marking machine. The
hatching line spacing of laser marking is generally 0.01mm-0.1mm. Laser marking generates a
large number of contour lines data, and the contour lines of any shape have extremely high
requirements on the running efficiency of programs. Please check the elapsed time of your
hatching algorithm and analyze its performance to provide a strategy or direction for optimizing
the performance and efficiency of the hatching algorithm, so that it can meet the efficiency
requirement of actual industrial applications.

3.激光打标机产生的光斑直径很小。激光打标的影线间距一般为0.01mm-0.1mm，激光打标产生大量的等高线数据，任何形状的等高线对程序的运行效率都有极高的要求。请检查您的填充算法的运行时间，并分析其性能，为优化填充算法的性能和效率提供策略或方向，使其能够满足实际工业应用的效率要求。

09-11

09-13
09-10
01-08 4606
09-19 1万+