A method for generating building clusters based on adaptive grid-expanded wavefunction collapse.

By using an adaptive grid-expanded wavefunction collapse algorithm, the limitations of regular grids in generating building clusters by the wavefunction collapse algorithm are solved, enabling seamless connection of building components and simulation of actual urban distribution, and generating building clusters that conform to the actual urban space.

CN117582664BActive Publication Date: 2026-11-10NORTHEASTERN UNIV CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311684340.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-08
Publication Date
2026-11-10
Estimated Expiration
2043-12-08

AI Technical Summary

Technical Problem

Existing wave function collapse algorithms are limited by regular grids when generating building clusters, making it difficult to adapt to complex curved regions, and the generated results do not meet the requirements of actual urban spatial distribution.

Method used

An adaptive grid-expanded wavefunction collapse algorithm is adopted. By designing a curve graphics editor to draw regions of arbitrary shapes, adaptive grids and trilinear interpolation are used to deform building components. Combined with heat map data, functional areas are divided to generate building clusters.

Benefits of technology

It achieves seamless connection of building components, and the generated building clusters conform to the actual urban distribution, are applicable to areas of any shape, and improve the generation efficiency and the realism of the results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117582664B_ABST
    Figure CN117582664B_ABST
Patent Text Reader

Abstract

This invention provides a method for generating building clusters based on adaptive grid-based extended wavefunction collapse, belonging to the field of game design technology. First, a curve graph editor is designed, allowing users to freely draw curves of arbitrary shapes, which serve as the generation area for building clusters. Second, the state space of the WFC (Wave Function Collapse) is changed to an adaptive grid, capable of adapting to curves of arbitrary shapes, while maintaining uniform cell size and approximate square dimensions. Finally, for irregular cells, trilinear interpolation is used to deform building components based on a cage. This invention, considering the characteristics of contemporary building clusters, improves the limitations of WFC from two aspects: the WFC state space and the deformation of building components, achieving seamless connection of building components during algorithm execution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of game design technology, and in particular to a method for generating building clusters based on adaptive grid-extended wavefunction collapse. Background Technology

[0002] Procedural Content Generation (PCG) is a method of automatically generating content using algorithms, rather than manually creating it. Combining PCG with handcrafted assets, this approach, known as hybrid planning, typically combines human-generated assets and algorithms with the randomness and processing power of computer generation. PCG technology can be divided into two categories: online PCG and offline PCG. Online PCG refers to content being generated while using media; while offline PCG refers to content being pre-generated and can be optimized by developers. Offline PCG consumes more memory and can be more time-consuming for all created content. Online creation makes it possible to generate more content. The advantages offered by PCG are not limited to providing game designers with rapid content prototyping, but also include in-game adaptation to player reactions and smaller memory footprint. As PCG technology continues to develop, the efficient mass production of more content has become a research hotspot, leading to the development of wave function collapse algorithms.

[0003] Wave Function Collapse (WFC) is a constraint-based procedural algorithm that emerged from the practice of procedural content generation. It is named after the concept of wave function collapse in quantum physics. This algorithm not only demonstrates its main output—large images generated in the style of the source provided by the artist—but also exhibits a surprisingly human-like incremental creation mode. WFC is a unique and novel algorithm with strong scalability, quickly adapting to 3D work. In urban spatial layout, WFC can rapidly generate multiple layout schemes conforming to design rules, providing a dynamic urban spatial design method. Furthermore, its characteristic of producing "large outputs" from "small inputs" allows developers to generate building clusters of the same style based on individual buildings, greatly accelerating the generation speed of building clusters and providing an efficient and feasible procedural generation scheme for building clusters.

[0004] Despite the potential advantages of wavefunction collapse algorithms, most WFC applications still rely on regular meshes and uniformly sized slots. This regularity has a global impact on the generated results, thus limiting the creation of building clusters. On one hand, it requires developers to have a deep understanding of how these constraint-based techniques work. On the other hand, for 3D cities, the spatial distribution and coverage methods are crucial for ensuring aesthetically pleasing scenes. Furthermore, regular meshes are unsuitable for complex curved areas. Therefore, WFC has significant room for improvement in its state space, as its only requirement is that each slot has an equal number of edges and doesn't necessarily need a regular shape. Modifications to the WFC algorithm can create foundations for entirely different content while maintaining the same quality as the original algorithm. Summary of the Invention

[0005] The technical problem to be solved by this invention is to address the shortcomings of the prior art by providing a building cluster generation method based on adaptive grid-extended wavefunction collapse. Combining the characteristics of contemporary building clusters, this method improves the limitations of WFC from two aspects: the WFC state space and the deformation of building components, achieving a seamless connection of building components during the algorithm's operation.

[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for generating building clusters based on adaptive grid extended wave function collapse is proposed. First, a curve graph editor is designed, allowing users to freely draw curve graphs of arbitrary shapes, which serve as the generation area for building clusters. Second, the state space of WFC is changed to an adaptive grid, which can adapt to curve graphs of arbitrary shapes, while ensuring uniform cell size and approximate squareness. Finally, for irregular cells, trilinear interpolation is used to deform building components based on cages.

[0007] Furthermore, the method specifically includes the following steps: Step 1: Draw the curve graph; Use a third-order Bézier curve to simulate a smooth curve to draw a closed region graphic D. The Bézier curve is defined by the following types of points: starting point, ending point or anchor point, and control point. Step 2: Sprinkle dots within the drawn area; The Poisson disk sampling algorithm is used to scatter points on the curve to obtain a uniform set of points. ,in, Defined as Internal point set, Defined as Boundary curve The point set on; Step 3: Construct a triangular mesh for the region graphic; Step 4: Construct a quadrilateral grid for the region graphic; The output triangular mesh is quadrilateralized using triangle merging and cell decomposition methods, transforming the unstructured triangular mesh into a structured quadrilateral mesh. Furthermore, the mesh is regularized to ensure that the quadrilaterals are as uniformly sized as possible, resulting in a list of quadrilaterals. ; Step 5: Use the adaptive grid as the state space for the wavefunction collapse algorithm; List of quadrilaterals Slot set as a wavefunction collapse algorithm ,make ; Step 6: Combine the residential population heat map and use the wave function collapse algorithm to divide the functional areas; Step 7: Apply the wave function collapse algorithm to generate building clusters in each functional area using the corresponding building components; Step 8: Perform cage-based deformation on the building components.

[0008] Furthermore, the specific method of step 1 is as follows: Given a center point C that determines the overall position of a segment of a Bézier curve, the positional information of the four points that determine the first segment of the curve is: starting point... End point and 2 control points and ;in, The initial step size is used to initialize the starting and ending points of the first Bézier curve; the point position information of the remaining Bézier curves is calculated from the previous curve and the ending point position when the curve is drawn, as shown in formula (1). (1) in, and For the first Two control points of a segment of a Bézier curve; Anchor points are added during the drawing process; their position information is obtained through user input. Control points corresponding to the anchor points control the shape of the curve; when the position of an anchor point changes, the corresponding control points change position synchronously. A cubic Bézier curve is defined as: Set anchor points The t value at that location is Then the ordinate The control point of anchor point P and The location information is shown in formula (2); (2) in, anchor point With the previous anchor point The straight-line distance For the Bézier curve at point... The derivative at point .

[0009] Furthermore, in step 2, the point set is obtained. The method is as follows: Initialize a graphic that can cover the area 2D background grid Point sets are used to store samples and accelerate spatial search. The minimum distance between any two points is defined as For each cell The cell size is set to Using a two-dimensional integer array Storage background grid Sample points in the middle cell index Randomly selected initial samples Insert it into the grid and use the index Initialize activity list In the middle; if Not empty, choose a random index. From around radius and The most uniform selection in the spherical rings between 1 point; for each point, check if it is within a distance of the existing sample points. If a point is far enough away from existing sample points, it is used as the next sample point. And add to the activity list In the middle; if in If no such point is found after the first attempt, remove it from the activity list. .

[0010] Furthermore, in step 2, the point set is obtained. The method is as follows: For curves Perform point resampling; the point distribution density is determined by the point set. The point density in the data determines the definition of the resampled point set. For curves Each segment of Bézier curve , Define the interval between two interpolation points The spacing is ,when When it is a constant value, The length of the point set is also a constant, assuming the point set... The average distance between points in the middle is Then let It can be calculated The value; thus, in The range is constantly increasing Obtain the point set after curve resampling .

[0011] Furthermore, the specific method for step 3 is as follows: Super Triangle Let it be a right triangle, with a set of points. All points in the list are inside the supertriangle; the triangle list is defined as follows: For any sample point According to formula (3), determine whether it is inside the circumcircle of any triangle; if If it is located inside the circumcircle of a triangle, a "flip" operation is required; (3) in, , , for The vertex.

[0012] Furthermore, the specific method of step 4 is as follows: Step 4.1: Obtain a quadrilateral by merging triangles; Define the list of quadrilaterals generated by this process as follows: An iterative method of randomly removing the edges of triangles is used to merge neighboring triangles into quadrilaterals. Introducing the mass of a triangle and quadrilateral deformation factor ; Triangle mass Defined as the ratio of the area of ​​a triangle to the sum of the squares of its sides; for a quadrilateral, by connecting its diagonals, we obtain four triangles, and the sum of the squares of the four triangles... Arranged from largest to smallest as follows: , , , Deformation factor Defined as four triangles arranged in descending order. The ratio of values ​​is shown in formulas (4) and (5); (4) (5) in, It is a triangle The unit normal vector, setting an equilateral triangle as the optimal triangular mesh, and adding coefficients. Make the equilateral triangle for ; , , It is a triangle The three sides; traverse the list of triangles List of all corresponding edges Find the quadrilateral formed after removing all sides. Value, by Remove the corresponding edges in descending order of their values; Step 4.2: Obtain the quadrilateral by decomposing the cells; Define the remaining triangle as , the triangle Divide into five quadrilaterals, and divide the quadrilaterals into five quadrilaterals. Split into four quadrilaterals to obtain a list of quadrilaterals. And irregular quadrilateral grids; Step 4.3: Regularization of quadrilateral meshes; Given a quadrilateral Find a square with the same centroid as the quadrilateral such that the sum of the squares of the distances between the vertices of the quadrilateral and the vertices of the square is minimized, thus finding the most suitable angle of the square. And in this direction, the four vertices of the quadrilateral are displaced; the sum of the square distances between the vertices of the quadrilateral and the vertices of the square is shown in formula (6), and the most suitable angle is... As shown in formula (7); (6) (7) in, , These are the x and y coordinates of the vertices of the quadrilateral. , These are the x and y coordinates of the vertices of the square; The value is determined by The direction force at the vertex is determined to be... .

[0013] Furthermore, the specific method of step 6 is as follows: Step 6.1: Add weights to the slots using the resident population heatmap data: Determine each slot Heatmap data at the midpoint yields the slot set. Corresponding weight data Slots with higher weights are most likely to become residential areas and have priority during algorithm execution. Step 6.2: The slot In its corresponding component collection The probability of selecting residential components increases, and the slots after introducing thermal weighting... The entropy is shown in formula (8), for a component The probability of being selected is shown in formula (9); (8) (9) in, Indicator slot thermal weight, For components The initial probability of being selected. A collection of densely populated components. A collection of sparsely populated components; For slots The initial entropy value; Step 6.3: Run the wave function collapse algorithm on the irregular quadrilateral grid to obtain different functional regions.

[0014] Furthermore, the specific method of step 8 is as follows: When a building component is added to a virtual unit hexahedral cage, the position information of the points within the component will change as the shape of the cage changes; Points on Define the set of vertices of the cage as ,point The location information is shown in formula (10): (10).

[0015] The beneficial effects of adopting the above technical solution are as follows: The building cluster generation method based on adaptive mesh extended wavefunction collapse provided by this invention uses an adaptive mesh to change the state space of the Wave Function Collapse (WFC), enabling the WFC to be applied to regions of arbitrary shapes. Simultaneously, the adaptive mesh in this invention features uniform cell size and near-square dimensions, and uses trilinear interpolation to deform building components, making it more suitable for building cluster production. This invention incorporates heatmap data, influencing the collapse sequence of WFC slots and the probability of slots selecting response components. This allows the generated building clusters and functional area divisions to simulate the building distribution and functional area divisions of a near-real city, making them more realistic. The generated building clusters can be applied to any virtual scenario. Attached Figure Description

[0016] Figure 1 A flowchart of a building cluster generation method based on adaptive grid extended wave function collapse provided in an embodiment of the present invention. Detailed Implementation

[0017] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0018] First, a curve graph editor is designed, allowing users to freely draw curves of arbitrary shapes, which serve as the generation area for building clusters. Second, the state space of the WFC (World Wide Frame Controller) is changed to an adaptive grid, which is highly adaptive, able to adapt to curves of arbitrary shapes, while maintaining uniform cell size and approximate square dimensions. Finally, for irregular cells, trilinear interpolation is used to perform cage-based deformation of the building components, achieving seamless connection of building components during algorithm execution. Figure 1 As shown, the method of this embodiment is specifically described below.

[0019] Step 1: Draw the curve graph.

[0020] A closed region D is drawn using a third-order Bézier curve to simulate a smooth curve. The Bézier curve is defined by several types of points: a start point, an end point (also called an anchor point), and control points. The shape of the Bézier curve changes by adjusting the control points. Given a center point C that determines the overall position of a segment of the Bézier curve, the positional information of the four points determining the first segment is: the start point... End point and 2 control points and .in, The initial step size is used to initialize the starting and ending points of the first Bézier curve segment; the point position information of the remaining Bézier curve segments is calculated from the previous curve segment and the ending point position when drawing the curve segment, as shown in formula (1).

[0021] (1) in, and For the first Two control points of a segment of a Bézier curve; Anchor points added during the drawing process have their position information obtained through user input. Control points corresponding to these anchor points control the shape of the curve. When the position of an anchor point changes, the corresponding control points change position synchronously. A cubic Bézier curve is defined as: Set anchor points The t value at that location is Then the ordinate The control point of anchor point P and The location information is shown in formula (2).

[0022] (2) in, anchor point With the previous anchor point The straight-line distance For the Bézier curve at point... The derivative at point .

[0023] Step 2: Sprinkle dots within the drawn area.

[0024] The Poisson disk sampling algorithm is used to scatter points on the curve graph to obtain a uniform set of points. .in, Defined as Internal point set, Defined as Boundary curve The set of points on the [aspect].

[0025] Step 2.1: Obtain the point set .

[0026] Initialize a graphic that can cover the area 2D background grid Point sets are used to store samples and accelerate spatial search. The minimum distance between any two points is defined as For each cell The cell size is set to Using a two-dimensional integer array Storage background grid Sample points in the middle cell index Randomly selected initial samples Insert it into the grid and use the index Initialize activity list In the middle. If Not empty, choose a random index. From around radius and The most uniform selection in the spherical rings between There are several points. For each point, check if it is within a certain distance of the existing sample points. If a point is far enough away from existing sample points, it is used as the next sample point. And add to the activity list In the middle; if in If no such point is found after the first attempt, remove it from the activity list. .

[0027] Step 2.2: Obtain the point set .

[0028] For graph curves Perform point resampling; the point distribution density is determined by the point set. The point density in the data determines the definition of the resampled point set. For graphical curves Each segment of Bézier curve , Define the interval between two interpolation points The spacing is ,when When it is a constant value, The length of the point set is also a constant, assuming the point set... The average distance between points in the middle is Then let It can be calculated The value of . Thus, in The range is constantly increasing The curve can then be obtained. Resampled point set .

[0029] Step 3: Construct a triangular mesh for the region graphic.

[0030] Super Triangle Let it be a right triangle, with a set of points. All points in the supertriangle are inside it. Define the list of triangles as follows: For any sample point According to formula (3), determine whether it is inside the circumcircle of any triangle. If If it is located inside the circumcircle of a triangle, a "flip" operation is required.

[0031] (3) in, , , for The vertex.

[0032] Step 4: Construct a quadrilateral grid for the region graphic.

[0033] The output triangular mesh is quadrilateralized using triangle merging and cell decomposition methods. This aims to transform the unstructured triangular mesh into a structured quadrilateral mesh. Furthermore, the mesh is regularized to ensure that the quadrilaterals are as uniformly sized as possible, resulting in a list of quadrilaterals. The specific method is as follows: Step 4.1: Obtain a quadrilateral by merging triangles.

[0034] Define the list of quadrilaterals generated by this process as follows: An iterative method of randomly removing edges from triangles is used to merge neighboring triangles into quadrilaterals. Triangle mass is introduced. and quadrilateral deformation factor The mass of the triangle Defined as the ratio of the area of ​​a triangle to the sum of the squares of its sides. For a quadrilateral, by connecting its diagonals, we can obtain four triangles. The sum of the squares of the four triangles... Arranged from largest to smallest as follows: , , , ; Deformation factor Defined as four triangles arranged in descending order. The ratio of values ​​is shown in formulas (4) and (5).

[0035] (4) (5) in, Given the unit normal vector of the triangle, and defining an equilateral triangle as the optimal triangular mesh, a coefficient is added. Make the equilateral triangle for ; , , It is a triangle Given three sides, iterate through the list of triangles. List of all corresponding edges Find the quadrilateral formed after removing all sides. Value, by Edges are removed in descending order of value.

[0036] Step 4.2: Obtain quadrilaterals by decomposing cells.

[0037] Define the remaining triangle as , the triangle Divide into five quadrilaterals, and divide the quadrilaterals into five quadrilaterals. Split into four quadrilaterals to obtain a list of quadrilaterals. And irregular quadrilateral grids.

[0038] Step 4.3: Regularization of quadrilateral meshes.

[0039] Given a quadrilateral Find a square with the same centroid as the quadrilateral such that the sum of the squares of the distances between the vertices of the quadrilateral and the vertices of the square is minimized, thus finding the most suitable angle of the square. And in this direction, the four vertices of the quadrilateral are displaced. The sum of the square distances between the vertices of the quadrilateral and the vertices of the square is shown in formula (6), and the most suitable angle is... As shown in formula (7).

[0040] (6) (7) in, , These are the x and y coordinates of the vertices of the quadrilateral. , These are the x and y coordinates of the vertices of the square; The value is determined by The direction force at the vertex is determined to be... .

[0041] Step 5: Use the adaptive mesh as the state space of WFC.

[0042] Quadrilateral list as slot set for the Wavefunction Collapse Algorithm (WFC) ,make .

[0043] Step 6: Combine the heat map with WFC to divide the functional areas.

[0044] A population heatmap reflects the population size within a given area. The closer the heatmap color is to red, the higher the population density; the closer it is to blue, the lower the population density. Weights are assigned to slots based on the heatmap data. Each slot is then evaluated. Heatmap data at the midpoint yields the slot set. Corresponding weight data Slots with higher weights are most likely to become residential areas and have priority during algorithm execution. In its corresponding component collection The probability of selecting residential components increases, and the slots after introducing thermal weighting... The entropy formula (8) shows that a component The probability of being selected is shown in formula (9).

[0045] (8) (9) in, Indicator slot thermal weight, For components The initial probability of being selected. A collection of densely populated components. A collection of sparsely populated components; For slots The initial entropy value. The WFC algorithm is run on an irregular quadrilateral grid to obtain different functional regions.

[0046] Step 7: Generate building clusters in each functional area.

[0047] In residential areas, commercial areas, and other areas, the WFC algorithm is applied to generate various building clusters using corresponding building components.

[0048] Step 8: Perform cage-based deformation on the building components.

[0049] Adding a building component to a virtual unit hexahedral cage will cause the positional information of points within the component to change as the shape of the cage changes. Component Points on Define the set of vertices of the cage as ,point The location information is shown in formula (10): (10) The building cluster generation method based on adaptive grid-expanded wavefunction collapse in this embodiment can generate well-defined and reasonable building clusters on regions of arbitrary shapes. Furthermore, by incorporating heatmap data, the method can simulate the building distribution and functional zoning of a near-real city, and the generated building clusters can be applied to any virtual scenario.

[0050] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.

Claims

1. A method for generating building clusters based on adaptive grid-extended wavefunction collapse, characterized in that: The method first designs a curve graph editor that allows users to freely draw curve graphs of arbitrary shapes, which serve as the generation area for building clusters. Secondly, the state space of the wave function collapse is changed to an adaptive grid, which can adapt to curves of arbitrary shapes, while the cell size is uniform and approximately square; finally, for irregular cells, trilinear interpolation is used to deform the building components based on the cage. The method specifically includes the following steps: Step 1: Draw the curve graph; Use a third-order Bézier curve to simulate a smooth curve to draw a closed region graphic D. The Bézier curve is defined by the following types of points: starting point, ending point or anchor point, and control point. Step 2: Sprinkle dots within the drawn area; The Poisson disk sampling algorithm is used to scatter points on the curve to obtain a uniform set of points. ,in, Defined as Internal point set, Defined as Boundary curve The point set on; Step 3: Construct a triangular mesh for the region graphic; Step 4: Construct a quadrilateral grid for the region graphic; The output triangular mesh is quadrilateralized using triangle merging and cell decomposition methods, transforming the unstructured triangular mesh into a structured quadrilateral mesh. Furthermore, the mesh is regularized to ensure that the quadrilaterals are as uniformly sized as possible, resulting in a list of quadrilaterals. ; Step 5: Use the adaptive mesh as the state space for the wavefunction collapse algorithm; List of quadrilaterals Slot set as a wavefunction collapse algorithm ,make ; Step 6: Combine the residential population heat map and use the wave function collapse algorithm to divide the functional areas; Step 7: Apply the wave function collapse algorithm to generate building clusters in each functional area using the corresponding building components; Step 8: Perform cage-based deformation on the building components.

2. The building cluster generation method based on adaptive grid-extended wavefunction collapse according to claim 1, characterized in that: The specific method for step 1 is as follows: Given a center point C that determines the overall position of a segment of a Bézier curve, the positional information of the four points that determine the first segment of the curve is: starting point... End point and 2 control points and ;in, The initial step size is used to initialize the starting and ending points of the first Bézier curve; the point position information of the remaining Bézier curves is calculated from the previous curve and the ending point position when the curve is drawn, as shown in formula (1). (1) in, and For the first Two control points of a segment of a Bézier curve; Anchor points are added during the drawing process; their position information is obtained through user input. Control points corresponding to the anchor points control the shape of the curve; when the position of an anchor point changes, the corresponding control points change position synchronously. A cubic Bézier curve is defined as: Set anchor points The t value at that location is Then the ordinate The control point of anchor point P and The location information is shown in formula (2); (2) in, anchor point With the previous anchor point The straight-line distance For the Bézier curve at point The derivative at point .

3. The building cluster generation method based on adaptive grid-extended wavefunction collapse according to claim 2, characterized in that: In step 2, the point set is obtained. The method is as follows: Initialize a graphic that can cover the area 2D background grid Point sets are used to store samples and accelerate spatial search. The minimum distance between any two points is defined as For each cell The cell size is set to Using a two-dimensional integer array Storage background grid Sample points in the middle cell index Randomly selected initial samples Insert it into the grid and use the index Initialize activity list In the middle; if Not empty, choose a random index. From around radius and The most uniform selection in the spherical rings between 1 point; for each point, check if it is within a distance of the existing sample points. If a point is far enough away from existing sample points, it is used as the next sample point. And add to the activity list In the middle; if in If no such point is found after the first attempt, remove it from the activity list. .

4. The building cluster generation method based on adaptive grid extended wavefunction collapse according to claim 3, characterized in that: In step 2, the point set is obtained. The method is as follows: For curves Perform point resampling; the point distribution density is determined by the point set. The point density in the data determines the definition of the resampled point set. For curves Each segment of Bézier curve , Define the interval between two interpolation points The spacing is ,when When it is a constant value, The length of the point set is also a constant, assuming the point set... The average distance between points in the middle is Then let It can be calculated The value; thus, in The range is constantly increasing Obtain the point set after curve resampling .

5. The building cluster generation method based on adaptive grid extended wavefunction collapse according to claim 4, characterized in that: The specific method for step 3 is as follows: Super Triangle Let it be a right triangle, with a set of points. All points in the list are inside the supertriangle; the triangle list is defined as follows: For any sample point According to formula (3), determine whether it is inside the circumcircle of any triangle; if If it is located inside the circumcircle of a triangle, a "flip" operation is required; (3) in, , , for The vertex.

6. The building cluster generation method based on adaptive grid extended wavefunction collapse according to claim 5, characterized in that: The specific method for step 4 is as follows: Step 4.1: Obtain a quadrilateral by merging triangles; Define the list of quadrilaterals generated by this process as follows: An iterative method of randomly removing the edges of triangles is used to merge neighboring triangles into quadrilaterals. Introducing the mass of a triangle and quadrilateral deformation factor ; Triangle mass Defined as the ratio of the area of ​​a triangle to the sum of the squares of its sides; for A quadrilateral, by connecting its diagonals, yields four triangles; the four triangles... Arranged from largest to smallest as follows: , , , ; Deformation factor Defined as four triangles arranged in descending order. The ratio of values ​​is shown in formulas (4) and (5); (4) (5) in, It is a triangle The unit normal vector, setting an equilateral triangle as the optimal triangular mesh, and adding coefficients. Make the equilateral triangle for ; , , It is a triangle The three sides; traverse the list of triangles List of all corresponding edges Find the quadrilateral formed after removing all sides. Value, by Remove the corresponding edges in descending order of their values; Step 4.2: Obtain the quadrilateral by decomposing the cells; Define the remaining triangle as , the triangle Divide into five quadrilaterals, and divide the quadrilaterals into five quadrilaterals. Split into four quadrilaterals to obtain a list of quadrilaterals. And irregular quadrilateral grids; Step 4.3: Regularization of quadrilateral meshes; Given a quadrilateral Find a square with the same centroid as the quadrilateral such that the sum of the squares of the distances between the vertices of the quadrilateral and the vertices of the square is minimized, thus finding the most suitable angle of the square. And in this direction, the four vertices of the quadrilateral are displaced; the sum of the square distances between the vertices of the quadrilateral and the vertices of the square is shown in formula (6), and the most suitable angle is... As shown in formula (7); (6) (7) in, , These are the x and y coordinates of the vertices of the quadrilateral. , These are the x and y coordinates of the vertices of the square; The value is determined by The direction force at the vertex is determined to be... .

7. The building cluster generation method based on adaptive grid extended wavefunction collapse according to claim 6, characterized in that: The specific method for step 6 is as follows: Step 6.1: Add weights to the slots using the resident population heatmap data: Determine each slot Heatmap data at the midpoint yields the slot set. Corresponding weight data Slots with higher weights are most likely to become residential areas and have priority during algorithm execution. Step 6.2: The slot In its corresponding component collection The probability of selecting residential components increases, and the slots after introducing thermal weighting... The entropy is shown in formula (8), for a component The probability of being selected is shown in formula (9); (8) (9) in, Indicator slot thermal weight, For components The initial probability of being selected. A collection of densely populated components. A collection of sparsely populated components; For slots The initial entropy value; Step 6.3: Run the wave function collapse algorithm on the irregular quadrilateral grid to obtain different functional regions.

8. The method for generating building clusters based on adaptive grid-extended wavefunction collapse according to claim 7, characterized in that: The specific method for step 8 is as follows: When a building component is added to a virtual unit hexahedral cage, the positional information of the points within the component will change as the shape of the cage changes; Points on Define the set of vertices of the cage as ,point The location information is shown in formula (10): (10)。