METHOD OF IMPLEMENTING WIND FIELD IN WEB BROWSER USING GRAPHIC CARD COMPUTING POWER

20230177238 · 2023-06-08

    Inventors

    Cpc classification

    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] FIG. 1 schematically illustrates a prior art method for displaying wind fields.

    [0014] FIG. 2 is a flow chart schematically describing one embodiment of a method for simulating wind fields in a web browser using the computing power of a graphics card, according to the invention.

    [0015] FIG. 3 schematically illustrates a method for locating a particle in an animation frame within a wind field, according to the invention.

    [0016] FIGS. 4A and 4B schematically illustrate an animation method of a wind flow marker, according to the invention.

    [0017] FIG. 5 schematically illustrates a wind field visualization process according to the invention.

    DETAILED DESCRIPTION

    [0018] The present disclosure will now be described in detail with reference the accompanying drawing(s).

    [0019] FIG. 2 illustrates one embodiment of the invention, in which a method for simulating wind fields in a web browser using the computing power of a graphics card is described in a flow chart.

    [0020] As can be seen from FIG. 2, the method may comprise the steps of: obtaining wind field data (S100), uploading the wind field data (S200), freeing up a memory space (S300), saving a first position of a particle (S400), determining a second position of the particle (S500), updating the position of the particle (S600) and visualizing a wind flow marker (S700).

    [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] FIG. 3 schematically illustrates a method for locating a particle in an animation frame within a wind field, according to the invention.

    [0028] Referring to FIG. 3, after obtaining wind field data of which wind vector components x and y (u, v) are recorded in a lattice form, the wind field data can be indicated by arrows. A particle corresponding to a certain wind flow marker is randomly placed on the wind field to determine its first position. If this first position of the particle lies between lattices, a wind vector that is applied between lattices can be calculated by bilinear interpolation. A second position of the particle is then calculated from the first position of the particle using the wind field data in this first position. In particular, a second position of the particle can be calculated from the first position of the particle using a frame time interval (Δt) of the animation that visualizes a corresponding wind flow marker.

    [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] FIG. 4 schematically illustrates an animation method of a wind flow marker, according to the invention. In particular, FIG. 4A illustrates an animation method for one particle, and FIG. 4B illustrates an animation method for n particles.

    [0032] Referring first to FIG. 4A, in (a), a first position of a particle is determined and in (b), a second position of the particle is determined after one frame. Here, the second position of the particle becomes the head of a wind flow marker, and the first position of the particle becomes the tail of a wind flow marker. Then, again in (c), a third position of the particle is determined after one frame. At this time, the third position of the particle becomes the new head of a wind flow marker, and the second position of the particle followed by the first positions of the particle become the tail of a wind flow marker. These steps can be repeated such that a wind flow marker is visualized, looking like a flowing particle.

    [0033] Turning now to FIG. 4B, animation for n particles can be simulated.

    [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] FIG. 5 schematically illustrates a wind field visualization process according to the invention.

    [0038] As can be seen from FIG. 5, with positions of wind flow markers being kept updated for every frame and presented on the screen, the wind flow markers can be visualized, appearing as flowing particles to the viewer.

    [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 FIG. 4B, to simulate animation of (M+1) frames for N particles, a memory space for N × (M+1) arrays is required. In other words, the step of freeing up a memory space may comprise securing a memory space for N × (M+1) arrays.

    [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 FIGS. 3 and 4, the position of a wind flow marker is being kept updated for every frame so that the head and tail of the wind flow marker are updated to the latest position of a corresponding particle and presented on the screen, which renders a visualized wind flow marker appearing as a flowing particle to the viewer.

    [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.