Sunshine Duration Calculation Method and System for Building Regeneration Based on Spherical Coordinates
By converting the sunshine trajectory into the sunshine cone surface under the spherical coordinate system and calculating the occlusion interval of the building model, the problem of difficulty in taking into account both the calculation accuracy and speed in the prior art is solved, and high-precision and high-efficiency sunshine time calculation is achieved, which is suitable for complex buildings.
Patent Information
- Application Number
- CN202510398003.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-04-01
AI Technical Summary
The existing Rizhao calculation software relies on the Rizhao sampling density, which makes it difficult to take into account both the calculation accuracy and the calculation speed, and it is difficult to calculate the Rizhao of complex buildings.
The method based on spherical coordinates is used to convert the sunshine trajectory into the sunshine cone surface under the spherical coordinate system. By finding the longitude of the collision intersection point between the sunshine cone surface and the architectural model, the occlusion interval of the triangle grid is calculated, and the interval merging Boolean operation is performed to obtain the occlusion interval and sunshine duration of the architectural model.
Without relying on time sampling density, the accuracy of sunshine time in milliseconds is achieved, reducing the difficulty of calculation, and greatly improving the calculation accuracy and speed, which is suitable for sunshine calculations in complex buildings.
Smart Images

Figure CN119918150B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer-aided design, and particularly to a method and system for calculating sunshine duration for building regeneration based on spherical coordinates. Background Art
[0002] A large number of CAD building drawing software, intelligent planning software, etc. all need to calculate the sunshine of buildings. For example, for the architectural design model after demolition and renovation, it is necessary to calculate the sunshine duration to design the distance and shape between multiple buildings more appropriately, so as to obtain better lighting conditions and avoid excessive light occlusion affecting the living experience of residents. Most existing sunshine calculation software calculates the sunshine duration by sampling and subdividing time, and the calculation accuracy depends on the sampling density. The problem brought about by this is that the sunshine accuracy and calculation speed are highly correlated. According to the "Standard for Building Sunshine Calculation Parameters" GB / T50947-2014, the sunshine sampling interval needs to be less than 1 minute, and the overall error needs to be less than 3 minutes; however, the accuracy of the sunshine calculation software based on sampling is limited, and if the calculation accuracy is improved, the cost of computing resources is too high, which will lead to a significant increase in calculation time, and it is difficult to balance the calculation accuracy and calculation speed. And the existing sunshine calculation software based on the occlusion interval can effectively speed up the calculation speed, but the existing algorithms cannot calculate the sunshine of buildings with complex geometric shapes. Summary of the Invention
[0003] (I) Technical Problems to be Solved
[0004] Based on the above problems, the present invention provides a method and system for calculating sunshine duration for building regeneration based on spherical coordinates, which solves the problems that the existing technology depends on the sunshine sampling density, it is difficult to balance the calculation accuracy and calculation speed, and there is a calculation difficulty for complex buildings.
[0005] (II) Technical Solutions
[0006] Based on the above technical problems, the present invention provides a method for calculating the sunshine duration of a building model based on spherical coordinate transformation, including:
[0007] S1. Taking the moving trajectory of the sun in a day as the bottom surface and the measuring point as the vertex, obtaining a sunshine cone surface in the spherical coordinate system, and obtaining sunshine cone surface parameters according to the sunshine analysis date and time period, where the sunshine cone surface parameters include the cone vector of the cone vertex, the cone angle, and the sunshine analysis time period interval;
[0008] S2. Triangulating the building model, and converting the spatial rectangular coordinates of the vertices of the triangular mesh into spherical coordinates in the same spherical coordinate system as the sunshine cone surface according to the cone vector of the cone vertex;
[0009] S3. Finding the triangular meshes that collide with the sunshine cone surface according to the cone angle;
[0010] S4. Calculate the longitudes of the two intersection points of the triangular mesh that collides with the sunlight cone surface and the sunlight cone surface. The range obtained from the longitudes of the two intersection points is the occlusion interval of the triangular mesh.
[0011] S5. Perform an interval merging Boolean operation on the occlusion intervals corresponding to all the triangular meshes that collide with the sunlight cone surface to obtain the occlusion interval of the building model.
[0012] S6. Subtract the occlusion interval of the building model from the sunlight analysis time period interval to obtain the sunlight interval of the measurement point, and calculate the sunlight duration according to the sunlight interval of the measurement point.
[0013] Further, S3 includes: determining whether the azimuth angle coordinates of the three vertices of the triangular mesh all satisfy being greater than the cone angle or all less than the cone angle. If so, the triangular mesh does not collide with the sunlight cone surface; otherwise, there is a collision.
[0014] Further, S4 includes: if the edges intersecting with the sunlight cone surface are AB and AC, the spherical coordinates of vertex A are (r1, θ1, φ1), the spherical coordinates of vertex B are (r2, θ2, φ2), the spherical coordinates of vertex C are (r3, θ3, φ3), and α is the cone angle, then the longitude d of the intersection point D of edge AB and the sunlight cone surface is d = (α - θ2) * (φ1 - φ2) / (θ1 - θ2) + φ2, and the longitude e of the intersection point E of edge AC and the sunlight cone surface is e = (α - θ3) * (φ1 - φ3) / (θ1 - θ3) + φ3. Assuming e > d, the occlusion interval of triangular mesh ABC is (d, e).
[0015] Further, in S5, the interval merging Boolean operation is to find the union.
[0016] Further, in S6, the calculating the sunlight duration according to the sunlight interval of the measurement point includes: obtaining the sunlight duration according to the difference between the end values of the sunlight interval of the measurement point.
[0017] The present invention also discloses a sunlight duration calculation system for building regeneration based on spherical coordinates, including:
[0018] At least one processor; and at least one memory communicatively connected to the processor, wherein:
[0019] The memory stores program instructions executable by the processor, and the processor can execute the above method by invoking the program instructions.
[0020] The present invention also discloses a non-transitory computer-readable storage medium that stores computer instructions, and the computer instructions cause the computer to execute the above method.
[0021] (3) Beneficial Effects
[0022] The above technical solutions of the present invention have the following advantages:
[0023] (1) In the present invention, the sunlight trajectory is converted into a sunlight cone surface in the spherical coordinate system. By calculating the longitude of the intersection points of the sunlight cone surface and each triangular mesh of the building model that collides, the occlusion interval of the triangular mesh is obtained. Then, through interval merging Boolean operations, the occlusion interval of the building model is obtained, which is the sunlight interval and sunlight duration of the measurement point. Without relying on the time sampling density, the sunlight duration accuracy at the millisecond level can still be obtained. Therefore, while reducing the calculation difficulty of the sunlight duration, the calculation accuracy and calculation speed are greatly improved;
[0024] (2) In the calculation method of the sunlight duration of the present invention, the method of converting the building model into triangular meshes is extremely mature and applicable to various building models including complex buildings. The calculation method of the sunlight duration can be used for calculating the sunlight duration of building models on all geometric building software, reducing the calculation difficulty while having excellent versatility. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings. The drawings are schematic and should not be construed as limiting the present invention in any way. In the drawings:
[0026] Figure 1 is a schematic flow chart of the sunlight duration calculation method for building regeneration based on spherical coordinates according to an embodiment of the present invention;
[0027] Figure 2 is a schematic diagram of the sunlight cone surface according to an embodiment of the present invention;
[0028] Figure 3 is a schematic diagram of the collision between the building model and the sunlight cone surface according to an embodiment of the present invention;
[0029] Figure 4 is a schematic diagram of the principle of the occlusion interval of the triangular mesh that collides with the sunlight cone surface according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] The following will further describe in detail the specific embodiments of the present invention with reference to the accompanying drawings and embodiments. The following embodiments are used to illustrate the present invention but are not intended to limit the scope of the present invention.
[0031] An embodiment of the present invention is a sunlight duration calculation method for building regeneration based on spherical coordinates, as Figure 1 shown, including the following steps:
[0032] S1. Take the moving trajectory of the sun within a day as the base and the measuring point as the vertex to obtain the sunshine cone surface in the spherical coordinate system. Obtain the sunshine cone surface parameters according to the sunshine analysis date and time period. The sunshine cone surface parameters include the cone direction vector of the cone vertex, the cone angle, and the sunshine analysis time period interval.
[0033] According to the solar motion law and sunshine calculation parameter specification, the moving trajectory of the sun within a day can be approximately considered as a circle on the celestial sphere with the measuring point as the center of the sphere. A conical surface can be formed by the trajectory and the center of the circle, that is, the sunshine cone surface with the moving trajectory of the sun within a day as the base and the measuring point as the vertex.
[0034] As Figure 2 shown, the sunshine cone surface parameters can be obtained according to the sunshine analysis date and analysis time period. The sunshine cone surface parameters include that the cone direction vector of the cone vertex is = ([[]]END]] v x , v y , v z ), the cone angle is α, and the sunshine analysis time period interval is (T1, T2), where T1 and T2 are the start time and end time of the sunshine analysis time period respectively, both T1 and T2 are true solar time, the cone angle α also represents the latitude of the sunshine cone surface, and the cone direction vector is based on the space rectangular coordinate system and points from the cone vertex to the center of the circle.
[0035] S2. Triangulate the building model, and convert the space rectangular coordinates of the vertices of the triangular mesh into spherical coordinates in the same spherical coordinate system as the sunshine cone surface according to the cone direction vector of the cone vertex.
[0036] According to the cone direction vector = ([[]]END]] v x , v y , v z ), perform spherical coordinate conversion, so as to convert the space rectangular coordinates of the vertices of the triangular mesh into spherical coordinates based on the center of the spherical coordinate where the cone vertex is located, so that the sunshine cone surface and the building model are both in the same spherical coordinate system.
[0037] S3. Find the triangular meshes that collide with the sunshine cone surface according to the cone angle: Judge whether the azimuth coordinates of the three vertices of the triangular mesh satisfy both being greater than the cone angle or both being less than the cone angle. If so, the triangular mesh does not collide with the sunshine cone surface, otherwise, there is a collision.
[0038] As Figure 3 shown, even for a complex building model, it is composed of multiple triangular meshes. The occlusion interval problem of the complex building model can be converted into the occlusion interval problems of multiple triangular meshes.
[0039] When there is no collision between the triangular mesh and the solar cone, if the triangular mesh is above the solar cone, the azimuth angles of the three vertices of the triangular mesh are all greater than the cone angle of the solar cone; if the triangular mesh is below the solar cone, the azimuth angles of the three vertices of the triangular mesh are all less than the cone angle of the solar cone. When there is a collision between the triangular mesh and the solar cone, the three vertices of the triangular mesh must not be on the same side of the solar cone, so there must be one or two vertices whose azimuth angles are greater than the cone angle of the solar cone, that is, when the azimuth angle coordinates of the three vertices of the triangular mesh do not satisfy being all greater than or all less than the cone angle.
[0040] S4. Calculate the longitudes of the two intersection points of the triangular mesh that collides with the solar cone and the solar cone. The range obtained from the longitudes of the two intersection points is the occlusion interval of the triangular mesh.
[0041] When there is a collision between the triangular mesh and the solar cone, the three vertices of the triangular mesh must not be on the same side of the solar cone, so there must be two edges of the colliding triangular mesh that intersect with the solar cone. The interval obtained from the longitudes of the two intersection points of the two edges of the colliding triangular mesh and the solar cone is the collision interval between the triangular mesh and the solar cone, that is, the occlusion interval of the triangular mesh. The method for solving the longitudes of the two intersection points of the two edges of the colliding triangular mesh and the solar cone is as follows:
[0042] As Figure 4 shown, if the edges intersecting with the solar cone are AB and AC, the spherical coordinates of vertex A are (r1, θ1, φ1), the spherical coordinates of vertex B are (r2, θ2, φ2), and the spherical coordinates of vertex C are (r3, θ3, φ3). θ1, θ2, and θ3 are the latitudes of the corresponding vertices, φ1, φ2, and φ3 are the longitudes of the corresponding vertices, and r1, r2, and r3 are the altitudes of the corresponding vertices, but they will not be used when solving the longitude. The intersection points D and E of the edges AB and AC intersecting with the solar cone are on the solar cone, and the latitudes of the intersection points D and E are the same as the latitude of the solar cone, both being the cone angle α. Then the longitude d of intersection point D can be calculated as d = (α - θ2)*(φ1 - φ2) / (θ1 - θ2) + φ2, and the longitude of intersection point E is e = (α - θ3)*(φ1 - φ3) / (θ1 - θ3) + φ3. Assuming e > d, the occlusion interval of triangular mesh ABC is (d, e).
[0043] S5. Perform an interval union Boolean operation on the occlusion intervals corresponding to all triangular meshes that collide with the solar cone to obtain the occlusion interval of the building model.
[0044] From S4, a list of occlusion intervals for all triangular meshes can be obtained. All the triangular meshes form a building model. Therefore, perform an interval union Boolean operation on the occlusion intervals of all triangular meshes, that is, find the union, to obtain the occlusion interval of the building model.
[0045] S6. Subtract the occlusion interval of the building model from the sunlight analysis time period interval to obtain the sunlight interval of the measurement point, and calculate the sunlight duration according to the sunlight interval of the measurement point;
[0046] Subtract the occlusion interval of the building model from the sunlight analysis time period interval (T1, T2) to obtain the sunlight interval of the measurement point, and obtain the sunlight duration according to the difference between the end values of the sunlight interval of the measurement point, so as to obtain an accurate sunlight interval and sunlight duration of the measurement point.
[0047] Finally, it should be noted that the above calculation method can be converted into software program instructions, which can be implemented by running a control system including a processor and a memory, or can be implemented by computer instructions stored in a non-transitory computer-readable storage medium. The above integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above software functional unit is stored in a storage medium, including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute some steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: USB flash drive, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disc, etc., which can store program codes.
[0048] In summary, through the above-mentioned sunlight duration calculation method and system for building regeneration based on spherical coordinates, the following beneficial effects can be obtained:
[0049] (1) In the present invention, the sunlight trajectory is converted into a sunlight cone surface in the spherical coordinate system. By finding the intersection longitude of each collided triangular mesh of the sunlight cone surface and the building model, the occlusion interval of the triangular mesh is obtained, and then through an interval union Boolean operation, the occlusion interval of the building model is obtained, that is, the sunlight interval and sunlight duration of the measurement point. Without relying on the time sampling density, the sunlight duration accuracy at the millisecond level can still be obtained. Therefore, while reducing the calculation difficulty of the sunlight duration, the calculation accuracy and calculation speed are greatly improved;
[0050] (2) In the calculation method of sunshine duration of the present invention, the method of converting a building model into triangular meshes is extremely mature and applicable to various building models including complex buildings. The calculation method of sunshine duration can be used for calculating the sunshine duration of building models on all geometric building software, reducing the calculation difficulty while having excellent generality.
[0051] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the embodiments of the present invention are described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A method for calculating sunshine duration for building regeneration based on spherical coordinates, characterized in that: include: S1. Taking the moving track of the sun in one day as the base and the measuring point as the vertex, a sunshine cone in the spherical coordinate system is obtained, and sunshine cone parameters are obtained according to the sunshine analysis date and time period. The sunshine cone parameters include the cone direction vector, cone angle, and sunshine analysis time interval of the cone vertex; S2, triangulating the building model, and converting the spatial rectangular coordinates of the vertices of the triangulated mesh into spherical coordinates in the same spherical coordinate system as the sunlight cone surface according to the cone direction vector of the cone vertex; S3, according to the cone angle, find the triangular mesh that collides with the sunlight cone surface: determine whether the azimuth coordinates of the three vertices of the triangular mesh are all greater than the cone angle or all less than the cone angle, if so, there is no collision between the triangular mesh and the sunlight cone surface, otherwise, there is a collision; S4. Calculate the longitudes of the two intersection points of the triangular mesh colliding with the sunshine cone and the sunshine cone. The range of the longitudes of the two intersection points is the occlusion interval of the triangular mesh: if the edges intersecting with the sunshine cone are AB and AC, the spherical coordinates of vertex A are (r1, θ1, φ1), the spherical coordinates of vertex B are (r2, θ2, φ2), the spherical coordinates of vertex C are (r3, θ3, φ3), α is the cone angle, then the longitude of the intersection point D between the edge AB and the sunshine cone is d= (α-θ2)*(φ1-φ2) / (θ1-θ2)+φ2, the longitude of the intersection point E between the edge AC and the sunshine cone is e= (α-θ3)*(φ1-φ3) / (θ1-θ3)+φ3, assuming e>d, the occlusion interval of the triangular mesh ABC is (d, e); S5, performing interval merging Boolean operation on the occlusion intervals corresponding to all the triangular meshes that collide with the sunlight cone to obtain the occlusion intervals of the building model; S6. Subtract the shielding interval of the building model from the sunshine analysis period to obtain the sunshine interval of the measuring point, and calculate the sunshine duration according to the sunshine interval of the measuring point.
2. The sunshine duration calculation method for building regeneration based on spherical coordinates according to claim 1 is characterized in that: In S5, the interval merging Boolean operation is to obtain a union.
3. The sunshine duration calculation method for building regeneration based on spherical coordinates according to claim 1 is characterized in that: In S6, the calculating of the sunshine duration according to the sunshine interval of the measuring point includes: obtaining the sunshine duration according to the difference between the end values of the sunshine interval of the measuring point.
4. A sunshine duration calculation system for building regeneration based on spherical coordinates, characterized in that: include: at least one processor; and at least one memory in communication with the processor, wherein: The memory stores program instructions that can be executed by the processor, and the processor can execute the method according to any one of claims 1 to 3 by calling the program instructions.
5. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which cause the computer to execute the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
CIM platform-based city-level building sunshine amount calculation method and system
CN117951426A