A method for dynamic lighting control of UAV formations and related components
By determining the geometric center and constructing orthogonal bases in the drone formation, multi-beam dynamic scanning in three-dimensional space was achieved, solving the problems of insufficient stereoscopic sense and flexibility in existing technologies, and improving the visual effect and adaptability of light shows.
Patent Information
- Application Number
- CN202511411463.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-09-29
AI Technical Summary
Existing drone formation lighting control methods struggle to achieve dynamic, multi-beam scanning effects in three-dimensional space, lacking a sense of depth and flexibility, and have poor scalability, making them unsuitable for performances of different scales and diverse needs.
By determining the geometric center of the drone formation as the reference origin, an orthogonal basis is constructed to define a dynamic plane, the three-dimensional position is projected into two-dimensional polar coordinates, the beam angle and color are calculated, and a dynamic light animation sequence is generated.
It achieves multi-beam dynamic scanning effect of drone formations in three-dimensional space, enhancing the spatial three-dimensionality and visual complexity of light shows. It supports scanning in any direction and has good real-time performance and scalability.
Smart Images

Figure CN120897303B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of unmanned aerial vehicle (UAV) technology, and in particular to a method for dynamic lighting control of UAV formations and related components. Background Technology
[0002] With the rapid development of drone formation performance technology, lighting animation has become one of the key technologies for enhancing the visual effects and artistic expression of performances. Radar scanning, as a common form of lighting expression, currently relies mostly on simple rotation and color changes in a two-dimensional plane, lacking the dynamism and flexibility in three-dimensional space.
[0003] Existing technologies typically achieve scanning effects by determining the formation's center point and performing overlap processing. However, this approach suffers from several drawbacks: First, existing methods struggle to achieve dynamic scanning in arbitrary directions within three-dimensional space, limiting the performance's three-dimensionality and space utilization. Second, multi-beam overlap often relies on simple color overlay or switching, failing to achieve complex beam transitions, synchronized multi-beam scanning, or other advanced visual effects. Furthermore, existing algorithms exhibit poor scalability, making it difficult to adapt to formations of varying sizes and diverse performance requirements. Therefore, a dynamic, multi-beam, and scalable drone formation lighting control method is urgently needed to enhance the artistic expressiveness and technological adaptability of light shows. Summary of the Invention
[0004] The purpose of this invention is to provide a method and related components for controlling the dynamic lighting of drone formations, which aims to solve the problem of insufficient visual effects of existing drone formation lighting in three-dimensional space.
[0005] In a first aspect, embodiments of the present invention provide a method for dynamic lighting control of unmanned aerial vehicle (UAV) formations, comprising:
[0006] Determine the geometric center of the drone formation in three-dimensional space, and use it as the reference origin for spatial transformation and scanning animation of the drone formation;
[0007] Construct corresponding orthogonal bases according to the specified scanning direction, and define the plane formed by the orthogonal bases as the dynamic plane where the scanning effect is located;
[0008] The position projection of each UAV in three-dimensional space is converted into two-dimensional polar coordinates on the dynamic plane to confirm the polar coordinate angle of each UAV in the dynamic plane;
[0009] The absolute scanning angle of each beam is calculated in real time based on the animation timeline length, the preset number of beams, and the total number of scans.
[0010] Calculate the final illumination intensity of each drone after being affected by all beams, and interpolate according to the preset color gradient to obtain the final light color;
[0011] The calculated final light color is assigned in real time to the corresponding drone's light material properties, and keyframes are inserted on the animation timeline to generate a dynamic light animation sequence.
[0012] Secondly, embodiments of the present invention provide a dynamic lighting control device for drone formations, comprising:
[0013] The reference confirmation unit is used to determine the geometric center of the UAV formation in three-dimensional space and to serve as the reference origin for the UAV formation to perform spatial transformations and scanning animations.
[0014] An orthogonal basis construction unit is used to construct a corresponding orthogonal basis according to a specified scanning direction, and to define the plane formed by the orthogonal basis as the dynamic plane where the scanning effect is located;
[0015] The conversion unit is used to convert the position projection of each UAV in three-dimensional space into two-dimensional polar coordinates on the dynamic plane to confirm the polar coordinate angle of each UAV in the dynamic plane.
[0016] Angle calculation unit is used to calculate the absolute scanning angle of each beam in real time based on the animation timeline length, the preset number of beams, and the total number of scans.
[0017] The color calculation unit is used to calculate the final illumination intensity of each drone after being affected by all beams, and to interpolate according to the preset color gradient to obtain the final light color;
[0018] The light generation unit is used to assign the calculated final light color to the corresponding drone's light material properties in real time, and insert keyframes on the animation timeline to generate a dynamic light animation sequence.
[0019] Thirdly, embodiments of the present invention provide a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the UAV formation dynamic lighting control method described in the first aspect.
[0020] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the UAV formation dynamic lighting control method described in the first aspect.
[0021] The beneficial effects of this invention are as follows: It simplifies the complex problem of three-dimensional spatial lighting arrangement into a two-dimensional angle calculation problem, greatly reducing computational complexity and ensuring real-time performance. It achieves multi-beam dynamic scanning effects of drone formations in three-dimensional space, significantly enhancing the spatial stereoscopic effect and visual complexity of light shows. This method supports scanning control in any direction, possesses good real-time performance and scalability, and can adapt to the needs of drone formation performances of different scales and forms. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 A flowchart illustrating the dynamic lighting control method for drone formations provided in an embodiment of the present invention;
[0024] Figure 2 This is a schematic diagram of a sub-process of step S101 provided in an embodiment of the present invention;
[0025] Figure 3 This is a schematic diagram of a sub-process of step S102 provided in an embodiment of the present invention;
[0026] Figure 4 This is a schematic diagram of a sub-process of step S103 provided in an embodiment of the present invention;
[0027] Figure 5 This is a schematic diagram of a sub-process of step S104 provided in an embodiment of the present invention;
[0028] Figure 6 This is a schematic diagram of a sub-process of step S105 provided in an embodiment of the present invention;
[0029] Figure 7 This is a schematic diagram of a sub-process of step S106 provided in an embodiment of the present invention;
[0030] Figure 8 A schematic block diagram of a drone formation dynamic lighting control device provided in an embodiment of the present invention;
[0031] Figure 9 A schematic block diagram of a computer device provided in an embodiment of the present invention;
[0032] Figure 10 Example diagram of the reference origin of the drone formation provided in the embodiments of the present invention;
[0033] Figure 11 This invention provides an illustration of the construction of an orthogonal basis.
[0034] Figure 12 This is a schematic diagram of the polar coordinate angle of the UAV in the dynamic plane provided in an embodiment of the present invention;
[0035] Figure 13 This is a dynamic scanning angle illustration provided by an embodiment of the present invention when the number of beams is 3;
[0036] Figure 14 This is a top-view rendering of the dynamic lighting control of drone formations provided in an embodiment of the present invention.
[0037] Figure 15 A three-dimensional spatial rendering of the dynamic lighting control of drone formation provided in an embodiment of the present invention. Detailed Implementation
[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0040] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0041] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0042] Please see Figure 1 , Figure 1 This is a flowchart illustrating the dynamic lighting control method for drone formations provided in an embodiment of the present invention.
[0043] like Figure 1 As shown, the method includes steps S101-S106.
[0044] S101. Determine the geometric center of the UAV formation in three-dimensional space, and use it as the reference origin for spatial transformation and scanning animation of the UAV formation;
[0045] This step aims to achieve spatial positioning by calculating the coordinates of all drones in three-dimensional space to determine the geometric center point of the entire drone formation, which serves as the reference origin for all subsequent spatial transformations and animation effects.
[0046] S102. Construct the corresponding orthogonal basis according to the specified scanning direction, and define the plane formed by the orthogonal basis as the dynamic plane where the scanning effect is located;
[0047] In this step, an orthogonal basis consisting of three mutually perpendicular vectors is constructed according to the specified scanning direction to define a virtual dynamic plane on which the light scanning effect will be performed.
[0048] S103. Convert the position projection of each UAV in three-dimensional space into two-dimensional polar coordinates on the dynamic plane to confirm the polar coordinate angle of each UAV in the dynamic plane.
[0049] In this step, the three-dimensional position of each drone is projected onto the two-dimensional dynamic plane. This process can be imagined as follows: there is a searchlight directly above the dynamic plane, shining vertically downwards. Each drone will cast a "shadow" on the plane. The polar coordinate angle of this "shadow" relative to the reference origin is calculated. This polar coordinate angle determines when the drone is illuminated in the light scanning animation (i.e., when the drone lights up).
[0050] S104. Calculate the absolute scanning angle of each beam in real time based on the animation timeline length, the preset number of beams, and the total number of scans.
[0051] S105. Calculate the final illumination intensity of each drone after being affected by all beams, and interpolate according to the preset color gradient to obtain the final light color;
[0052] In this step, it is checked whether each drone is within the "illuminated" range of any beam. A drone may be swept by multiple beams at the same time, but the influence of the brightest beam must be selected as its final illumination intensity. Then, based on the final illumination intensity, the corresponding color is selected from a preset color gradient bar, which is the final light color of that drone.
[0053] S106. Assign the calculated final light color to the corresponding drone's light material property in real time, and insert keyframes on the animation timeline to generate a dynamic light animation sequence.
[0054] In this step, the calculated final light color is automatically and in real time assigned to each corresponding drone, and the color state of each frame is recorded, which is then strung together into a smooth and dynamic light animation sequence.
[0055] In this embodiment, steps S101-S106 provide the overall framework for the drone formation dynamic lighting control method. The complex three-dimensional spatial lighting arrangement problem is simplified into an angle calculation problem on a two-dimensional plane, greatly reducing computational complexity and ensuring real-time performance. This achieves a multi-beam dynamic scanning effect for drone formations in three-dimensional space, significantly enhancing the spatial stereoscopic effect and visual complexity of the light show. This method supports scanning control in any direction, has good real-time performance and scalability, and can adapt to the needs of drone formation performances of different scales and forms.
[0056] In one embodiment, such as Figure 2 As shown, step S101 includes:
[0057] S201. Obtain the three-dimensional spatial coordinates of each drone;
[0058] S202. Calculate the maximum and minimum values of all drones on the three coordinate axes in three-dimensional space to obtain the minimum axis-aligned bounding box that can wrap the entire drone formation.
[0059] S203. Select the geometric center point in the smallest axis-aligned bounding box as the reference origin for the UAV formation to perform spatial transformation and scanning animation.
[0060] In this embodiment, as Figure 10 As shown, by acquiring the three-dimensional coordinates of each drone, the maximum and minimum values of all drones in the X, Y, and Z directions are calculated, thereby constructing a minimum cuboid region (i.e., the minimum axis-aligned bounding box) that can completely enclose the entire drone formation. The center point of this bounding box is the geometric center of the entire drone formation. This embodiment ensures that regardless of the formation shape and density distribution of the drones, its center point can accurately reflect the overall spatial position of the formation, providing a stable and accurate reference origin for subsequent spatial transformations and animation effects.
[0061] In one embodiment, such as Figure 3 As shown, step S102 includes:
[0062] S301. Obtain the unit direction vector corresponding to the specified scanning direction;
[0063] S302. Select one of the three coordinate axes in three-dimensional space that is not collinear with or parallel to the unit direction vector as the reference direction vector.
[0064] S303. Calculate the cross product of the unit direction vector and the reference direction vector to obtain the first basis vector;
[0065] S304. Calculate the cross product of the unit direction vector and the first basis vector to obtain the second basis vector;
[0066] S305. Using the unit direction vector, the first basis vector, and the second basis vector, construct an orthogonal basis corresponding to the specified scanning direction.
[0067] In this embodiment, as Figure 11 As shown, the reference direction vector The Z-axis [0,0,1] of the world coordinate system is selected as the reference first. To handle edge cases, when the unit direction vector is nearly parallel to the reference direction vector ref, the X-axis [1,0,0] or Y-axis [0,1,0] is automatically switched as the reference direction vector.
[0068] More specifically, the formula for constructing an orthogonal basis is: ;in, Denotes the first basis vector. This represents the second basis vector.
[0069] In this embodiment, the orthogonal basis constructed in steps S301-S305 serves as the dynamic plane where the scanning effect occurs, providing a mathematical basis for subsequent 3D to 2D projection, supporting arbitrary specified scanning directions, and greatly enhancing the flexibility and expressiveness of the lighting effect in 3D space.
[0070] In one embodiment, such as Figure 4 As shown, step S103 includes:
[0071] S401. Calculate the relative position vector of each UAV with respect to the reference origin;
[0072] In this step, the relative position vector refers to the precise position and orientation of the UAV relative to the reference origin;
[0073] S402. Project the relative position vector onto the dynamic plane to obtain the projection vector;
[0074] In this step, the projection vector is calculated using the following formula: ;in Represented as a relative position vector;
[0075] S403. The polar angle of the projection vector in the dynamic plane is calculated using the bivariate arctangent function, which is used as the polar coordinate angle of each UAV in the dynamic plane.
[0076] In this step, the polar coordinate angle is calculated using the following formula. : This polar coordinate angle determines when the drone will light up as the beam of light rotates and sweeps across the area.
[0077] In this embodiment, as Figure 12 As shown, the relative position vector of each drone with respect to the formation center is first calculated. Then the relative position vector Projecting onto the aforementioned dynamic plane, removing its component in the scanning direction, yields a two-dimensional projection vector. Finally, the polar angle of this projection vector relative to the orthogonal basis is calculated using the bivariate arctangent function (atan2). This polar angle uniquely determines the polar angle of each UAV in the dynamic plane, serving as the polar coordinate angle of each UAV in the dynamic plane.
[0078] In this embodiment, accurate projection and angle transformation from three-dimensional space to a two-dimensional dynamic plane are achieved, providing each drone with a unique orientation identifier in the scanning animation, ensuring the accuracy and spatial consistency of lighting effect calculations.
[0079] In one embodiment, such as Figure 5 As shown, step S104 includes:
[0080] S501, Get the normalized time ratio of the current animation frame within the total animation duration;
[0081] In this step, the relative time progress of the current animation frame within the total animation duration is calculated, multiplied by the total number of scans, and then the normalized time ratio of the previous animation frame within the total animation duration is obtained through modulo operation.
[0082] S502. Based on the normalized time ratio, the preset total number of scan cycles, and the scan direction parameters, calculate the reference rotation angle of the first scan beam in the current animation frame; wherein, the scan direction parameters are used to control the rotation direction of the beam to be clockwise or counterclockwise.
[0083] S503. Based on the preset number of beams, starting from the reference rotation angle, calculate the absolute scanning angle of all beams at the current moment by superimposing uniform angular intervals.
[0084] In this embodiment, the absolute scanning angle of the light beam at the current moment is calculated using the following formula:
[0085] ;
[0086] in, θ k ( t ) indicates the first k The beam at the current moment t The absolute scanning angle, T totalIndicates the total time period (the total duration of the entire scanning process); N cycles Indicates the total number of loops (the number of times the scan is repeated); N beams The total number of beams (the number of beams participating in the scan) is indicated; (mod 1) indicates the relative position within the current loop (between 0 and 1); (mod 2π) indicates that the final angle is limited to the range of (0, 2π).
[0087] For example, for N 2 beams, and they are divided into 2 π / N The intervals are uniformly distributed. The angle of the k-th beam. θ k From the initial angle θ base It is determined together with its index. For example... Figure 13 As shown, the number of beams N When the value is 3, the interval angle is calculated to be 120°, and the initial angle is... θ base =0. Here, CCW (sgn=+1) refers to defining counterclockwise as the positive direction.
[0088] In one embodiment, such as Figure 6 As shown, step S105 includes:
[0089] S601. Calculate the angle difference between the polar coordinate angle of each UAV and the absolute scanning angle of each beam;
[0090] In this step, for the polar angle of each drone phi (i.e., polar coordinate angle) ), calculate the polar angle phi and the current angle of each beam. θ k angular difference △ θ = ( phi - θ k The angle difference is Δ mod 2π. θ Used to indicate the degree of lag of the UAV in the beam scanning direction;
[0091] S602. Based on the angle difference, calculate the light intensity of each drone affected by each beam of light through a predefined intensity mapping function;
[0092] In this step, the angle difference △ θ Converted to a normalized energy value (power), and then passed through a piecewise linear mapping function. I =12 × power- 11 Calculates the light intensity. This function maps the region near the front edge of the beam (power≈1) to high intensity, while rapidly attenuating other regions to 0, thus creating a sharp and clear beam effect.
[0093] S603. For each drone, take the maximum value among all the light intensity calculated for that drone by all the light beams, and use it as the final light intensity for that drone.
[0094] In this step, a drone may be within the influence range of multiple light beams simultaneously. This step adopts the principle of maximum intensity superposition: iterates through the intensity values calculated by all light beams, and takes the maximum value max_power as the final illumination intensity of the drone; this ensures the clarity of the light effect and avoids blurring caused by the mixing of multiple colors.
[0095] S604. For each drone, interpolate the final light intensity in the preset color gradient to obtain the final light color of the drone.
[0096] In this step, the final light color is calculated by linear interpolation in the preset color gradient list `color_list` based on the final intensity `max_power`. Furthermore, a gradient mode can be set, which can add an additional brightness attenuation factor after the color calculation, creating a smooth brightness gradient effect at the tail of the beam and enhancing visual softness.
[0097] In this embodiment, based on the solutions in steps S601-S604, the problem of light mixing in multi-beam environments is solved by using the principle of maximum intensity superposition and a color interpolation algorithm. This avoids visual blurring caused by multi-beam mixing and produces a smooth color gradient effect, ultimately ensuring the sharpness, clarity, and rich color expression of the entire light show.
[0098] In one embodiment, such as Figure 7 As shown, step S106 includes:
[0099] S701, Traverse each animation frame of the animation timeline;
[0100] S702. In each animation frame, iterate through each drone in the drone formation and calculate the corresponding final light color;
[0101] S703. Apply the final light color to the light material properties of the corresponding drone;
[0102] S704. Insert a keyframe at the current animation frame time point for the color value of the light material property;
[0103] S705, execute repeatedly until all animation frames have been processed, generating a dynamic light animation sequence.
[0104] In this embodiment, the complete calculation of S101-105 is performed on each animation frame, and the calculated final color Color is applied to the light material property of the drone (such as diffuse_color); a keyframe is inserted in the current frame for the color property of the material; this process is repeated until all animation frames are processed to form a complete dynamic light animation sequence.
[0105] In addition, an ultra-wide black mode can be set. In this mode, for drones with zero light intensity, their color will be forced to black and keyframes will be inserted, thereby effectively enhancing the contrast between light and dark in the image.
[0106] In summary, by employing the method of this invention, it is possible to achieve a radar scanning animation effect in three-dimensional space for drone formations, and it supports multi-beam synchronous scanning and color gradation, significantly enhancing the visual expressiveness of light shows. (See reference...) Figure 14 The top-view rendering of the drone formation's dynamic lighting control is shown below. Figure 15 The image shown is a 3D spatial rendering of the dynamic lighting control of the drone formation.
[0107] This invention also provides a drone formation dynamic lighting control device, which is used to execute any of the aforementioned drone formation dynamic lighting control methods. Specifically, please refer to... Figure 8 , Figure 8 This is a schematic block diagram of the UAV formation dynamic lighting control device provided in an embodiment of the present invention.
[0108] like Figure 8 As shown, the UAV formation dynamic lighting control device 800 includes: a reference confirmation unit 801, an orthogonal basis construction unit 802, a conversion unit 803, an angle calculation unit 804, a color calculation unit 805, and a lighting generation unit 806.
[0109] The reference confirmation unit 801 is used to determine the geometric center of the UAV formation in three-dimensional space and to serve as the reference origin for the UAV formation to perform spatial transformation and scanning animation.
[0110] The orthogonal basis construction unit 802 is used to construct the corresponding orthogonal basis according to the specified scanning direction, and to define the plane formed by the orthogonal basis as the dynamic plane where the scanning effect is located;
[0111] The conversion unit 803 is used to convert the position projection of each UAV in three-dimensional space into two-dimensional polar coordinates on a dynamic plane to confirm the polar coordinate angle of each UAV in the dynamic plane.
[0112] Angle calculation unit 804 is used to calculate the absolute scanning angle of each beam in real time based on the animation timeline length, the preset number of beams and the total number of scans.
[0113] The color calculation unit 805 is used to calculate the final illumination intensity of each drone after being affected by all beams, and to interpolate according to the preset color gradient to obtain the final light color.
[0114] The light generation unit 806 is used to assign the calculated final light color to the corresponding drone's light material properties in real time, and insert keyframes on the animation timeline to generate a dynamic light animation sequence.
[0115] This device provides a general framework for dynamic lighting control of drone formations. By simplifying the complex problem of three-dimensional spatial lighting arrangement into an angle calculation problem on a two-dimensional plane, it significantly reduces computational complexity and ensures real-time performance. It achieves multi-beam dynamic scanning effects for drone formations in three-dimensional space, significantly enhancing the spatial stereoscopic effect and visual complexity of light shows. This method supports scanning control in any direction, possesses good real-time performance and scalability, and can adapt to the needs of drone formation performances of different scales and forms.
[0116] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0117] The aforementioned drone formation dynamic lighting control device can be implemented as a computer program, which can, for example... Figure 9 It runs on the computer device shown.
[0118] Please see Figure 9 , Figure 9 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. The computer device 900 is a server, which can be a standalone server or a server cluster composed of multiple servers.
[0119] See Figure 9 The computer device 900 includes a processor 902, a memory, and a network interface 905 connected via a system bus 901. The memory may include a non-volatile storage medium 903 and internal memory 904.
[0120] The non-volatile storage medium 903 can store an operating system 9031 and a computer program 9032. When the computer program 9032 is executed, it enables the processor 902 to execute a dynamic lighting control method for drone formations.
[0121] The processor 902 provides computing and control capabilities to support the operation of the entire computer device 900.
[0122] The internal memory 904 provides an environment for the operation of the computer program 9032 in the non-volatile storage medium 903. When the computer program 9032 is executed by the processor 902, the processor 902 can execute the UAV formation dynamic lighting control method.
[0123] The network interface 905 is used for network communication, such as providing data transmission. Those skilled in the art will understand that... Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device 900 to which the present invention is applied. The specific computer device 900 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0124] Those skilled in the art will understand that Figure 9 The embodiments of the computer device shown do not constitute a limitation on the specific configuration of the computer device. In other embodiments, the computer device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. For example, in some embodiments, the computer device may include only memory and a processor. In such embodiments, the structure and function of the memory and processor are different from those shown. Figure 9 The embodiments shown are consistent and will not be repeated here.
[0125] It should be understood that, in this embodiment of the invention, the processor 902 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0126] In another embodiment of the invention, a computer-readable storage medium is provided. This computer-readable storage medium may be a non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the UAV formation dynamic lighting control method of the embodiments of the present invention.
[0127] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code.
[0128] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0129] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for dynamic light control of unmanned aerial vehicle formation, characterized in that, The application relates to a method for generating a dynamic light scanning animation sequence of a UAV formation, comprising the following steps: determining the geometric center of the UAV formation in three-dimensional space and taking the geometric center as the reference origin point for space transformation and scanning animation of the UAV formation; constructing a corresponding orthogonal basis according to a specified scanning direction, and defining a plane formed by the orthogonal basis as a dynamic plane where a scanning effect is located; specifically comprising: obtaining a unit direction vector corresponding to the specified scanning direction; selecting a coordinate axis that is not collinear and not parallel with the unit direction vector in three coordinate axes of three-dimensional space as a reference direction vector; calculating the vector cross product of the unit direction vector and the reference direction vector to obtain a first basis vector; calculating the cross product of the unit direction vector and the first basis vector to obtain a second basis vector; and constructing the orthogonal basis corresponding to the specified scanning direction through the unit direction vector, the first basis vector and the second basis vector; projecting the position of each UAV in three-dimensional space into two-dimensional polar coordinates on the dynamic plane to confirm the polar coordinate angle of each UAV in the dynamic plane; real-time calculating the absolute scanning angle of each light beam according to the length of an animation time axis, a preset number of light beams and a total number of scanning circles; specifically comprising: obtaining a normalized time ratio of a current animation frame in the total animation time; calculating the reference rotation angle of a first scanning light in the current animation frame based on the normalized time ratio, the total number of scanning circles and scanning direction parameters; wherein the scanning direction parameters are used for controlling the rotation direction of the light beam to be clockwise or counterclockwise; according to the preset number of light beams, taking the reference rotation angle as the starting point, and calculating the absolute scanning angle of all light beams at the current time through superposition of uniform angular intervals; calculating the final light intensity of each UAV affected by all light beams, and performing interpolation according to a preset color gradient to obtain a final light color; real-time assigning the final light color calculated to the light material attribute of the corresponding UAV, and inserting key frames on the animation time axis to generate a dynamic light animation sequence. 2.The UAV formation dynamic light control method of claim 1, wherein, The method for generating the dynamic light scanning animation sequence of the UAV formation comprises the following steps: obtaining the three-dimensional space coordinates of each UAV; calculating the maximum value and the minimum value of all UAVs on three coordinate axes in three-dimensional space respectively to obtain a minimum axis-aligned bounding box capable of wrapping the entire UAV formation; selecting a geometric center point in the minimum axis-aligned bounding box as the reference origin point for space transformation and scanning animation of the UAV formation. 3.The method of claim 1, wherein, The method for projecting the position of each UAV in three-dimensional space into two-dimensional polar coordinates on the dynamic plane to confirm the polar coordinate angle of each UAV in the dynamic plane comprises the following steps: calculating the relative position vector of each UAV relative to the reference origin point; projecting the relative position vector onto the dynamic plane to obtain a projection vector; calculating the polar angle of the projection vector on the dynamic plane by using a two-variable inverse tangent function to serve as the polar coordinate angle of each UAV in the dynamic plane. 4.The method of claim 1, wherein, The final light intensity of each drone affected by all light beams is calculated, and interpolation is performed according to a preset color gradient to obtain a final light color, including: Calculate the angle difference between the polar coordinate angle of each drone and the absolute scanning angle of each light beam; Based on the angle difference, the illumination intensity of each drone affected by each light beam is calculated by a predefined intensity mapping function; For each drone, take the maximum value of the illumination intensity calculated by all light beams for the drone as the final illumination intensity of the drone; For each drone, the final light color of the drone is obtained by interpolating the final illumination intensity in the preset color gradient.
5. The method of claim 1, wherein, The calculated final light color is assigned to the light material property of the corresponding drone in real time, and key frames are inserted on the animation timeline to generate a dynamic light animation sequence, including: Traverse each animation frame of the animation timeline; In each animation frame, traverse each drone in the drone formation and calculate the corresponding final light color; Apply the final light color to the light material property of the corresponding drone; Insert key frames for the color value of the light material property at the current animation frame time point; Loop until all animation frames are processed to generate a dynamic light animation sequence.
6. A dynamic light control device for unmanned aerial vehicle formation, characterized in that, Including: A reference confirmation unit for determining the geometric center of the drone formation in three-dimensional space as the reference origin for spatial transformation and scanning animation of the drone formation; An orthogonal basis construction unit for constructing a corresponding orthogonal basis according to a specified scanning direction, and defining the plane formed by the orthogonal basis as a dynamic plane where the scanning effect occurs; specifically including: obtaining a unit direction vector corresponding to the specified scanning direction; selecting one of the three coordinate axes of the three-dimensional space as a reference direction vector which is not collinear and parallel to the unit direction vector; calculating the vector cross product of the unit direction vector and the reference direction vector to obtain a first basis vector; calculating the cross product of the unit direction vector and the first basis vector to obtain a second basis vector; constructing the orthogonal basis corresponding to the specified scanning direction through the unit direction vector, the first basis vector and the second basis vector; A conversion unit for projecting and converting the position of each drone in three-dimensional space to two-dimensional polar coordinates on the dynamic plane to determine the polar coordinate angle of each drone in the dynamic plane; An angle calculation unit for calculating the absolute scanning angle of each light beam in real time according to the animation timeline length, the preset number of light beams and the total number of scanning turns; specifically including: obtaining the normalized time proportion of the current animation frame in the total animation time; based on the normalized time proportion, the preset total number of scanning turns and the scanning direction parameter, calculating the reference rotation angle of the first scanning light in the current animation frame; wherein the scanning direction parameter is used to control the rotation direction of the light beam as clockwise or counterclockwise; according to the preset number of light beams, taking the reference rotation angle as the starting point, and calculating the absolute scanning angle of all light beams at the current time by superimposing uniform angular intervals; A color calculation unit is configured to calculate a final light intensity of each drone affected by all light beams, and interpolate a final light color according to a preset color gradient; A light generation unit is configured to assign the calculated final light color to a light material attribute of the corresponding drone in real time, and insert key frames on an animation timeline to generate a dynamic light animation sequence.
7. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the drone formation dynamic light control method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program causes the processor to execute the drone formation dynamic light control method according to any one of claims 1 to 5 when the processor executes the computer program.
Citation Information
Patent Citations
Method, system and application for realizing multicolor gradient light effect of unmanned aerial vehicle formation
CN115525065A
Passive multipoint fusion positioning method based on unmanned aerial vehicle cooperative formation
CN116610146A