METHOD OF IMPLEMENTING WIND FIELD IN WEB BROWSER USING GRAPHIC CARD COMPUTING POWER
20230177238 · 2023-06-08
Inventors
Cpc classification
Y02A90/10
GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
International classification
Abstract
The invention relates to method for simulating wind fields in a web browser using the computing power of a graphics card, the method comprising: obtaining wind field data, uploading the wind field data, freeing up a memory space, saving a first position of a particle, determining a second position of the particle, updating the position of the particle and visualizing a wind flow marker.
Claims
1. A method for simulating wind fields in a web browser using the computing power of a graphics card, comprising: obtaining wind field data by receiving raw weather information from a weather monitoring system to obtain the wind field data from the received weather information; uploading the wind field data to a graphic card; freeing up a memory space for a particle position storage array, where the positions of particles are to be saved; saving a first position of a particle by randomly placing a particle on a wind field to determine its first position and saving the first position in a current position section of the particle position storage array; determining a second position of the particle by calculating a second position of the particle from the first position of the particle using the wind field data therein; updating the position of the particle by updating the second position of the particle to the current position and saving the second position of the particle in the current position section of the particle position storage array, while saving the first position of the particle in a 1-frame preceding position section of the particle position storage array; and visualizing a wind flow marker by using the updated particle position storage array to visualize wind flow markers of particles on the screen.
2. The method according to claim 1, wherein the step of freeing up a memory space comprises securing a memory space for N x (M+1) arrays where positions of N particles for (M+1) frames are to be saved.
3. The method according to claim 1, wherein the step of determining a second position of the particle and the step of updating the position of the particle are carried out iteratively in order to determine a third position of the particle.
4. The method according to claim 1, wherein the step of determining a second position of the particle comprises calculating a second position of the particle using a frame time interval (Δt) of animation used for the visualization of a corresponding wind flow marker.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0013]
[0014]
[0015]
[0016]
[0017]
DETAILED DESCRIPTION
[0018] The present disclosure will now be described in detail with reference the accompanying drawing(s).
[0019]
[0020] As can be seen from
[0021] In the step of obtaining wind field data (S100), raw weather information is received from a weather monitoring system and wind field data is then obtained from the weather information.
[0022] Raw weather information may include data such as temperature, wind, atmospheric pressure, reflectivity, albedo, dew point, humidity, clouds, sea wind, etc. In the context of the invention, the raw weather information refers to wind data of any wind relevant characteristics. The wind data included in the raw weather information may have wind vector components x and y (u, v) recorded in a lattice form, which are herein referred to as wind field data.
[0023] In the step of uploading wind field data (S200), the wind field data is uploaded to a graphics card. As the wind field simulation method of the invention requires higher computing power than any conventional method of displaying wind fields by image blending, using a graphics card for computing the position of a wind flow marker (as described in more detail below) is advantageous for resolving such a high power requirement issue. Typically, a graphics card having thousands of to tens of thousands of computing units can demonstrate a very strong computing power for parallel processing of array value calculations.
[0024] In the step of freeing up a memory space (S300), a memory space is made available for a particle position storage array, where the positions of particles are to be saved. With the graphics card being responsible for computing the position of a wind flow marker in the invention, it is necessary to secure the memory space for the graphics card in relation to the particle position storage array where positions of particles are to be saved.
[0025] In the step of saving a first position of a particle (S400), a particle is randomly placed on a wind field to determine its first position, and this first position of the particle is then saved in a current position section of the particle position storage array. That is, a particle corresponding to a certain wind flow marker is randomly placed on a wind field based on the wind field data that had been uploaded to a graphics card, and an initial position of the particle is set as its first position. Once the first position of the particle is determined, it is saved in the ‘current’ position section in the particle position storage array where positions of particles are to be saved.
[0026] In the step of determining a second position of the particle (S500), a second position of the particle is calculated from the first position of the particle using the wind field data therein.
[0027]
[0028] Referring to
[0029] In further embodiments of a method for simulating wind fields in a web browser using the computing power of a graphics card according to the invention, the step of determining a second position of the particle (S500) includes calculating a second position of the particle using a frame time interval (Δt) of animation used for the visualization of a corresponding wind flow marker.
[0030] In the step of updating the position of the particle (S600), the newly calculated second position of the particle is updated to the current position and saved in a current position section of the particle position storage array. Thereafter, the first position of the particle is saved in a 1-frame preceding position section of the particle position storage array, such that the position of the particle after the frame time interval (Δt) of the animation may be updated.
[0031]
[0032] Referring first to
[0033] Turning now to
[0034] A wind flow marker herein is a symbol having the shape of a particle flowing in the air, so as to show the flow of wind in a dynamic animation. With the head and tail being configured for a wind flow marker, the afterimage effect can be enhanced.
[0035] As well known, animation herein refers to a process by which a number of still images are presented in quick enough succession that the human eye cannot perceive, making them appear as a continuous moving image. Accordingly, by updating positions of wind flow markers for every frame and presenting them on the screen, the wind flow markers will be visualized, appearing as flowing particles to the viewer.
[0036] Finally, in the step of visualizing a wind flow marker (S700), an updated particle position storage array is used to visualize a wind flow marker of the corresponding particle.
[0037]
[0038] As can be seen from
[0039] In further embodiments of a method for simulating wind fields in a web browser using the computing power of a graphics card according to the invention, the step of freeing up a memory space may include securing a memory space for N × (M+1) arrays where positions of N particles for (M+1) frames are to be saved.
[0040] Referring back to
[0041] In further embodiments of a method for simulating wind fields in a web browser using the computing power of a graphics card according to the invention, the step of determining a second position of the particle and the step of updating the position of the particle may be carried out iteratively in order to determine a third position of the particle.
[0042] As discussed previously with reference to
[0043] Hereinafter, various embodiments of the present disclosure will be described below.
[0044] (1) A method for simulating wind fields in a web browser using the computing power of a graphics card, comprising: obtaining wind field data by receiving raw weather information from a weather monitoring system to obtain the wind field data from the received weather information; uploading the wind field data to a graphic card; freeing up a memory space for a particle position storage array, where the positions of particles are to be saved; saving a first position of a particle by randomly placing a particle on a wind field to determine its first position and saving the first position in a current position section of the particle position storage array; determining a second position of the particle by calculating a second position of the particle from the first position of the particle using the wind field data therein; updating the position of the particle by updating the second position of the particle to the current position and saving the second position of the particle in the current position section of the particle position storage array, while saving the first position of the particle in a 1-frame preceding position section of the particle position storage array; and visualizing a wind flow marker by using the updated particle position storage array to visualize wind flow markers of particles on the screen.
[0045] (2) In the method for simulating wind fields in a web browser using the computing power of a graphics card, the step of freeing up a memory space comprises securing a memory space for N × (M+1) arrays where positions of N particles for (M+1) frames are to be saved.
[0046] (3) In the method for simulating wind fields in a web browser using the computing power of a graphics card, the step of determining a second position of the particle and the step of updating the position of the particle are carried out iteratively in order to determine a third position of the particle.
[0047] (4) In the method for simulating wind fields in a web browser using the computing power of a graphics card, the step of determining a second position of the particle comprises calculating a second position of the particle using a frame time interval (Δt) of animation used for the visualization of a corresponding wind flow marker.