Lamp point rotation control system and method

文档序号:1381941 发布日期:2020-08-14 浏览:11次 中文

阅读说明:本技术 灯点旋转控制系统及方法 (Lamp point rotation control system and method ) 是由 刘威 于 2020-05-06 设计创作,主要内容包括:本发明实施例提供一种灯点旋转控制系统,所述系统包括:展示模块,用于将实际灯点位置在建有参照坐标系的展示界面中展示为灯点矩阵;选取模块,与所述展示模块相连,用于从所述展示界面的灯点矩阵中选取待旋转的灯点,并确定所选取的灯点的原始坐标值以及旋转中心的坐标值;角度设置模块,与所述选取模块相连,用于设置所选取的灯点相对于旋转中心的目标旋转角度;以及旋转模块,与所述角度设置模块相连,用于根据所述旋转中心的坐标值与灯点的初始坐标值及目标旋转角度控制所选取的灯点绕所述旋转中心旋转所述目标旋转角度。本发明实施例能够方便地将选取的待旋转灯点进行任意角度的旋转,无需导入导出灯点数据,避免数据的丢失。(The embodiment of the invention provides a lamp point rotation control system, which comprises: the display module is used for displaying the actual lamp point position as a lamp point matrix in a display interface with a reference coordinate system; the selection module is connected with the display module and used for selecting the lamp points to be rotated from the lamp point matrix of the display interface and determining the original coordinate values of the selected lamp points and the coordinate values of the rotation center; the angle setting module is connected with the selecting module and used for setting a target rotation angle of the selected lamp point relative to the rotation center; and the rotating module is connected with the angle setting module and used for controlling the selected lamp points to rotate around the rotating center by the target rotating angle according to the coordinate values of the rotating center, the initial coordinate values of the lamp points and the target rotating angle. The embodiment of the invention can conveniently rotate the selected lamp point to be rotated by any angle without leading in and out the lamp point data, thereby avoiding the loss of the data.)

1. A lamp point rotation control system, comprising:

the display module is used for displaying the actual lamp point position as a lamp point matrix in a display interface with a reference coordinate system;

the selection module is connected with the display module and used for selecting the lamp points to be rotated from the lamp point matrix of the display interface and determining the initial coordinate values of the selected lamp points and the coordinate values of the rotation center;

the angle setting module is connected with the selecting module and used for setting a target rotation angle of the selected lamp point relative to the rotation center; and

and the rotating module is connected with the angle setting module and used for controlling the selected lamp points to rotate around the rotating center in the display interface by the target rotating angle according to the coordinate values of the rotating center, the initial coordinate values of the lamp points and the target rotating angle.

2. The lamp spot rotation control system of claim 1, wherein the selection module comprises:

the selection unit is used for selecting the lamp points to be rotated from the lamp point matrix of the display interface;

and the rotation center determining unit is connected with the selecting unit and used for determining the initial coordinate value of the selected lamp point, generating a geometric selecting frame externally connected with the selected lamp point, calculating the coordinate value of the geometric center point of the selected geometric selecting frame, determining the geometric center point as a rotation center, and determining the coordinate value of the geometric center point as the coordinate value of the rotation center.

3. The lamp point rotation control system of claim 1, wherein the angle setting module comprises:

the first input unit is used for appointing a target position which is to be reached after any one of the selected lamp points rotates in the display interface; and

and the calculating unit is connected with the first input unit and used for obtaining a target coordinate value of the target position and calculating and obtaining the target rotation angle according to the initial coordinate value of the lamp point of the specified target position, the target coordinate value and the coordinate value of the rotation center.

4. The lamp point rotation control system according to claim 1 or 3, wherein the angle setting module comprises:

and the second input unit is used for inputting the numerical value of the target rotation angle.

5. The lamp point rotation control system according to claim 3, wherein the calculation unit calculates the target rotation angle using a trigonometric function algorithm.

6. A lamp spot rotation control method, comprising the steps of:

displaying the actual lamp point position as a lamp point matrix in a display interface with a reference coordinate system;

selecting a lamp point to be rotated from the lamp point matrix of the display interface, and determining an initial coordinate value of the selected lamp point and a coordinate value of a rotation center;

setting a target rotation angle of the selected lamp point relative to the rotation center; and

and controlling the selected lamp points to rotate around the rotation center in the display interface by the target rotation angle according to the coordinate value of the rotation center, the initial coordinate value of the lamp points and the target rotation angle.

7. The lamp spot rotation control method according to claim 6, wherein the selecting a lamp spot to be rotated from the lamp spot matrix of the display interface and determining the initial coordinate value and the coordinate value of the rotation center of the selected lamp spot specifically comprises:

selecting lamp points to be rotated from the lamp point matrix of the display interface;

determining the coordinate value of the selected lamp point, generating a geometric selection frame externally connected with the selected lamp point, calculating the coordinate value of the geometric center point of the selected geometric selection frame, and determining the geometric center point as a rotation center, wherein the coordinate value of the geometric center point is the coordinate value of the rotation center.

8. The lamp point rotation control method of claim 6, wherein the setting of the target rotation angle of the selected lamp point with respect to the rotation center comprises:

appointing a target position which should be reached after any one of the selected lamp points rotates in the display interface;

and obtaining a target coordinate value of the target position, and calculating to obtain the target rotation angle according to the initial coordinate value of the lamp point of the specified target position, the target coordinate value and the coordinate value of the rotation center.

9. The lamp point rotation control method according to claim 6 or 8, wherein the setting of the target rotation angle of the selected lamp point with respect to the rotation center includes: and inputting the numerical value of the target rotation angle.

10. The lamp point rotation control method according to claim 8, wherein the calculating of the target rotation angle uses a trigonometric function algorithm to calculate the target rotation angle.

Technical Field

The embodiment of the invention relates to the technical field of light control, in particular to a system and a method for controlling light point rotation.

Background

When light in daily life needs to irradiate on an irregular object or a plane, the light emitting effect of an actual lamp needs to be adjusted through the lamp arrangement system, the lamp points of the actual lamp are arranged in a rectangular shape in the lamp arrangement system to be displayed, and the rectangular arrangement of the lamp points cannot correspond to the position of the actual lamp in subsequent sampling, so that the position of the lamp points in a lamp arrangement program needs to be rotated to adjust the arrangement result, the existing lamp point rotating system can only rotate 90 degrees generally, and when the lamp point rotating system needs to rotate at a more flexible angle, the lamp point rotating system needs to be assisted by editable software to achieve the purpose. Firstly, importing an editing file into a system window, exporting light point information in the system window into the editing file, then exporting the editing file, then opening the editing file by adopting other professional editing software, carrying out rotation operation on the light point information recorded in the editing file, and then importing the editing file stored after the rotation operation into the system window again to load the light point information, thereby realizing the rotation of the light point. However, in the rotation process, data needs to be imported or exported in the system window for multiple times, so that data is easily lost, and when the lamp point position modification is wrong, the operation of importing and exporting needs to be carried out again, so that the modification is troublesome.

Disclosure of Invention

The technical problem to be solved by the embodiments of the present invention is to provide a lamp spot rotation control system, which can conveniently control a lamp spot to rotate at any angle.

A further technical problem to be solved in the embodiments of the present invention is to provide a method for controlling rotation of a lamp point, which can conveniently control the lamp point to rotate at any angle.

In order to solve the technical problem, the embodiment of the invention adopts the following technical scheme: a lamp spot rotation control system comprising:

the display module is used for displaying the actual lamp point position as a lamp point matrix in a display interface with a reference coordinate system;

the selection module is connected with the display module and used for selecting the lamp points to be rotated from the lamp point matrix of the display interface and determining the initial coordinate values of the selected lamp points and the coordinate values of the rotation center;

the angle setting module is connected with the selecting module and used for setting a target rotation angle of the selected lamp point relative to the rotation center; and

and the rotating module is connected with the angle setting module and used for controlling the selected lamp points to rotate around the rotating center in the display interface by the target rotating angle according to the coordinate values of the rotating center, the initial coordinate values of the lamp points and the target rotating angle.

Further, the selecting module comprises:

the selection unit is used for selecting the lamp points to be rotated from the lamp point matrix of the display interface;

and the rotation center determining unit is connected with the selecting unit and used for determining the coordinate value of the selected lamp point, generating a geometric selecting frame externally connected with the selected lamp point, calculating the coordinate value of the geometric center point of the selected geometric selecting frame, and determining the geometric center point as a rotation center, wherein the coordinate value of the geometric center point is the coordinate value of the rotation center.

Further, the angle setting module includes:

the first input unit is used for appointing a target position which is to be reached after any one of the selected lamp points rotates in the display interface; and

and the calculating unit is connected with the first input unit and used for obtaining a target coordinate value of the target position and calculating and obtaining the target rotation angle according to the initial coordinate value of the lamp point of the specified target position, the target coordinate value and the coordinate value of the rotation center.

Further, the angle setting module includes:

and the second input unit is used for inputting the numerical value of the target rotation angle.

Further, the calculation unit calculates the target rotation angle using a trigonometric function algorithm.

On the other hand, in order to further solve the above technical problem, an embodiment of the present invention provides the following technical solutions: a lamp point rotation control method comprises the following steps:

displaying the actual lamp point position as a lamp point matrix in a display interface with a reference coordinate system;

selecting a lamp point to be rotated from the lamp point matrix of the display interface, and determining an initial coordinate value of the selected lamp point and a coordinate value of a rotation center;

setting a target rotation angle of the selected lamp point relative to the rotation center; and

and controlling the selected lamp points to rotate around the rotation center in the display interface by the target rotation angle according to the coordinate value of the rotation center, the initial coordinate value of the lamp points and the target rotation angle.

Further, the selecting a lamp point to be rotated and a coordinate value of a rotation center from the lamp point matrix of the display interface, and determining an original coordinate value of the selected lamp point includes:

selecting lamp points to be rotated from the lamp point matrix of the display interface;

determining the coordinate value of the selected lamp point, generating a geometric selection frame externally connected with the selected lamp point, calculating the coordinate value of the geometric center point of the selected geometric selection frame, and determining the geometric center point as a rotation center, wherein the coordinate value of the geometric center point is the coordinate value of the rotation center.

Further, the setting of the target rotation angle of the selected lamp point with respect to the rotation center includes:

appointing a target position which should be reached after any one of the selected lamp points rotates in the display interface;

and obtaining a target coordinate value of the target position, and calculating to obtain the target rotation angle according to the initial coordinate value of the lamp point of the specified target position, the target coordinate value and the coordinate value of the rotation center.

Further, the setting of the target rotation angle of the selected lamp point with respect to the rotation center includes:

and inputting the numerical value of the target rotation angle.

Further, the target rotation angle is calculated by adopting a trigonometric function algorithm.

By adopting the technical scheme, the embodiment of the invention at least has the following beneficial effects: according to the embodiment of the invention, the lamp point to be rotated is selected from the lamp point matrix displayed by the display module through the selection module, the initial coordinate value of the selected lamp point is obtained, the coordinate value of the rotation center of the lamp point to be selected is obtained through calculation, the target rotation angle of the lamp point rotating around the rotation center is set through the angle setting module, and the rotation module controls the lamp point to be rotated to rotate by the target rotation angle, so that the selected lamp point to be rotated can be conveniently controlled in rotation at any angle without using external software for rotation operation, lamp point data does not need to be led in and out, and data loss is avoided.

Drawings

Fig. 1 is a schematic view of a lamp to be rotated in a lamp dot matrix according to an alternative embodiment of the lamp dot rotation control system of the present invention.

Fig. 2 is a schematic view of rotated lamp spots in a lamp spot matrix of an alternative embodiment of the lamp spot rotation control system of the present invention.

Fig. 3 is a schematic block diagram of an alternate embodiment of a lamp spot rotation control system of the present invention.

Fig. 4 is a schematic block diagram of a selection module of an alternate embodiment of the lamp spot rotation control system of the present invention.

Fig. 5 is a schematic block diagram of an angle setting module of an alternate embodiment of the lamp spot rotation control system of the present invention.

Fig. 6 is a flowchart of the steps of an alternative embodiment of the lamp spot rotation control method of the present invention.

Fig. 7 is a flowchart illustrating step S2 of an alternative embodiment of the lamp point rotation control method according to the present invention.

Fig. 8 is a flowchart illustrating step S3 of an alternative embodiment of the lamp point rotation control method according to the present invention.

Fig. 9 is another schematic flow chart of step S3 of an alternative embodiment of the lamp point rotation control method according to the present invention.

Detailed Description

The invention is described in further detail below with reference to the figures and specific examples. It is to be understood that the following illustrative embodiments and description are only intended to illustrate the present invention, and are not intended to limit the present invention, and features of the embodiments and examples of the present invention may be combined with each other without conflict.

As shown in fig. 1 to 5, an alternative embodiment of the present invention provides a lamp point rotation control system, including:

the display module 1 is used for displaying the actual lamp point position as a lamp point matrix in a display interface with a reference coordinate system;

the selection module 3 is connected with the display module 1 and used for selecting the lamp points to be rotated from the lamp point matrix of the display interface and determining the initial coordinate values of the selected lamp points and the coordinate values of the rotation center;

the angle setting module 5 is connected with the selecting module 3 and used for setting a target rotation angle of the selected lamp point relative to a rotation center; and

and the rotating module 7 is connected with the angle setting module and is used for controlling the selected lamp points to rotate around the rotating center in the display interface by the target rotating angle according to the coordinate values of the rotating center, the initial coordinate values of the lamp points and the target rotating angle.

According to the embodiment of the invention, the lamp point to be rotated is selected from the lamp point matrix displayed by the display module 1 through the selection module 3, the initial coordinate value of the lamp point to be rotated and the coordinate value of the rotation center P are obtained through calculation, the angle of the lamp point rotating around the rotation center P is set through the angle setting module 5, and then the rotation module 7 can rotate the lamp point to be rotated, so that the selected lamp point to be rotated can be conveniently rotated at any angle, the rotation operation by external software is not needed, the lamp point data is not needed to be led in and out, and the data loss is avoided.

In another alternative embodiment of the present invention, as shown in fig. 4, the selecting module 3 includes:

a selecting unit 30, configured to select a lamp point to be rotated from the lamp point matrix of the display interface;

and a rotation center determining unit 32, connected to the selecting unit 10, for determining the coordinate values of the selected lamp points, generating a geometric selection frame externally connected to the selected lamp points, calculating the coordinate values of the geometric center point of the selected geometric selection frame, and determining the geometric center point as the rotation center P, where the coordinate values of the geometric center point are the coordinate values of the rotation center P.

In this embodiment, a light point to be rotated is selected by the selection module 3, and a geometric selection frame is generated by the rotation center P determination unit to perform frame selection on the selected light point.

In yet another alternative embodiment of the present invention, as shown in fig. 5, the angle setting module 5 comprises:

a first input unit 50, configured to specify, in the display interface, a target position a2 to which any one of the selected light points should reach after rotating; and

and a calculating unit 52 connected to the first input unit, for obtaining a target coordinate value of the target position a2, and calculating the target rotation angle according to the initial coordinate value of the lamp point assigned the target position a2, the target coordinate value, and the coordinate value of the rotation center P.

In this embodiment, the first input unit 50 designates the target position a2 after the lamp point rotates in the display interface, and the calculating unit calculates the target rotation angle of the designated lamp point rotating around the rotation center P, in specific implementation, the designated lamp point moves from the initial position a1 to the target position a2, the coordinate values of the initial position a1 and the target position a2 are calculated, and the rotation angle is calculated as the target rotation angle by calculating the coordinate values of the initial position a1 (X1, Y1) and the coordinate values of the target position a2 (X2, Y2).

In yet another alternative embodiment of the present invention, the angle setting module 5 includes:

a second input unit 54 for inputting the value of the target rotation angle. This embodiment is through the direct input to target rotation angle value, can carry out the angle when more common rotation, the quick convenient settlement of carrying out the rotation angle when lamp point needs to carry out.

In still another alternative embodiment of the present invention, the calculating unit 52 calculates the target rotation angle by using a trigonometric function algorithm. In the embodiment, the target rotation angle is calculated through the trigonometric function, and the target rotation angle can be conveniently and accurately obtained through the corresponding relation between the coordinate values and the angles.

In the embodiment, the reading unit 50 is arranged to read the rotation angle and the coordinate value of the lamp point, and the operation unit 52 is used to perform specific operation on the two values to obtain the result, so that the result error caused by the influence of the addition of other values on the operation result is avoided, and the accuracy of the system is effectively improved.

As shown in fig. 6, in another aspect, another alternative embodiment of the present invention further provides a lamp point rotation control method, including the steps of:

s1: displaying the actual lamp point position as a lamp point matrix in a display interface with a reference coordinate system;

s2: selecting a lamp point to be rotated from the lamp point matrix of the display interface, and determining an initial coordinate value of the selected lamp point and a coordinate value of a rotation center P;

s3: setting a target rotation angle of the selected lamp point relative to the rotation center P; and

s4: and controlling the selected lamp points to rotate around the rotation center P in the display interface by the target rotation angle according to the coordinate values of the rotation center P, the initial coordinate values of the lamp points and the target rotation angle.

In this embodiment, by the above method, the position information of the actual lamp points is arranged in the display interface as the lamp point matrix, the lamp points to be rotated are selected from the lamp point matrix displayed in the display module, so that the initial coordinate values of the lamp points and the coordinate values of the rotation center P can be calculated, the rotation of the target rotation angle value is performed on the selected lamp points to be rotated by setting the target rotation angle, in the specific implementation, the rotation coordinate values of the lamp points after rotating around the rotation center P are calculated by the initial coordinate values of the lamp points and the target rotation angle, and then the corresponding lamp points are modified to complete the rotation operation, which is simple and convenient and does not need to perform multiple leading-in and leading-out operations.

In yet another alternative embodiment of the present invention, as shown in fig. 7, the step S2 includes:

s21: selecting lamp points to be rotated from the lamp point matrix of the display interface;

s22: determining the coordinate value of the selected lamp point, generating a geometric selection frame externally connected with the selected lamp point, calculating the coordinate value of the geometric center point of the selected geometric selection frame, and determining the geometric center point as the rotation center P, wherein the coordinate value of the geometric center point is the coordinate value of the rotation center P.

According to the method, the center of the selected lamp point area is determined through the geometric selection frame, the lamp points to be rotated can be effectively selected, the lamp points to be rotated rotate around the rotation center, and the positions of other lamp points cannot be influenced.

In yet another alternative embodiment of the present invention, as shown in fig. 8, the step S3 includes:

s31: designating a target position A2 to be reached after any one of the selected lamp points rotates in the display interface;

s32: a target coordinate value of the target position is obtained, and the target rotation angle is calculated and obtained from the initial coordinate value of the lamp point at which the target position a2 is designated, the target coordinate value, and the coordinate value of the rotation center.

In the present embodiment, by the above method, the initial position a1 coordinate values (X1, Y1), the target position a2 coordinate values (X2, Y2) and the coordinate values (Xp, Yp) of the rotation center P before and after the movement of the light point are specified in the display interface, and the target rotation angle is obtained by calculation, so that flexible angle adjustment can be performed according to actual situations.

In yet another alternative embodiment of the present invention, as shown in fig. 9, the step S3 includes:

s33: and inputting the numerical value of the target rotation angle. According to the embodiment, the target rotation angle value is input to directly set through the method, and the lamp point can be conveniently and quickly rotated.

In yet another optional embodiment of the present invention, the algorithm for calculating the target rotation angle trigonometric function calculates the target rotation angle.

According to the method, the trigonometric function is adopted for calculation, only the angle value and the coordinate value are involved in the calculation process, and other parameters are not involved, so that the calculation result is more accurate, and the error rate of the calculation result is reduced.

The functions described in the embodiments of the present invention may be stored in a storage medium readable by a computing device if they are implemented in the form of software functional modules or units and sold or used as independent products. Based on such understanding, part of the contribution of the embodiments of the present invention to the prior art or part of the technical solution may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computing device (which may be a personal computer, a server, a mobile computing device, a network device, or the like) to execute all or part of the steps of the method described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.

While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于区块链的城市路灯管理方案

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!