A focal mechanism 3d visualization method and system based on multi-coordinate system mapping
By constructing a multi-coordinate system mapping and precise partitioning coloring technology, the problems of coordinate confusion and color penetration in the three-dimensional visualization of the source mechanism were solved, realizing synchronous rotation and interactive display of the three-dimensional visualization results, and improving the interpretability and boundary clarity of the source mechanism.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XINJIANG INST OF ENG
- Filing Date
- 2026-03-06
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, seismology and mining surveying use different coordinate systems, which leads to coordinate system confusion, complex transformations, and difficulties in verification in the 3D visualization of focal mechanisms. Furthermore, traditional interpolation coloring methods cause color bleeding near nodal lines and blurred boundaries, making it impossible to support real-time interactive rotational observation in 3D.
This paper presents a three-dimensional visualization method for seismic source mechanisms based on a multi-coordinate system-mapping. By constructing a converter for NED, ENU, XYZ and spherical coordinate systems, the paper uses the clip_scalar method for precise partitioning and coloring, utilizes the tube method for nodal line three-dimensional pipeline rendering, and configures a real-time display indicator for the dual coordinate systems of NED and XYZ to achieve synchronous rotation and interactive display of the three-dimensional visualization result.
It achieves unified mapping across different coordinate systems, solves the color penetration problem, improves boundary clarity, reduces the interpretation error rate, supports 3D rotation observation at any angle, and enhances the interpretability of the source mechanism.
Smart Images

Figure CN122151203A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of seismic source detection, and in particular to a three-dimensional visualization method and system for seismic source mechanisms based on multi-coordinate system-mapping. Background Technology
[0002] Focal mechanism, also known as fault plane solution or beachball, is an important tool in seismology for describing the earthquake rupture process. By analyzing the spatial distribution of the initial motion of seismic waves, the strike, dip, and rake of the earthquake fault can be retrieved. This is of great significance for understanding the causes of earthquakes, assessing seismic hazard, early warning of coal mine rockbursts, and prevention and control of mine disasters. In the field of coal mine safety monitoring, mining-induced seismicity refers to seismic activity caused by the redistribution of mining stress during coal mining, and is an important precursor and manifestation of dynamic disasters such as rockbursts in coal mines. Accurate visualization of focal mechanism is of great guiding significance for rockburst early warning, optimization of mining schemes, research on disaster mechanisms, and support design. With the development of three-dimensional visualization technology, upgrading focal mechanism from traditional two-dimensional projection maps to three-dimensional interactive visualization has become a research hotspot.
[0003] However, since seismology, mining surveying, and computer graphics belong to different disciplines and each uses different coordinate system conventions, the three-dimensional visualization of earthquake source mechanisms faces technical challenges such as coordinate system confusion, complex transformation, and difficulty in verification. Summary of the Invention
[0004] The purpose of this application is to provide a three-dimensional visualization method and system for focal mechanisms based on multi-coordinate system-mapping. This method can unify the mapping relationship between different coordinate systems, solve the problem of color penetration near nodal lines in traditional interpolation coloring methods, improve boundary clarity, and can display synchronously and rotate in conjunction with the three-dimensional view, thereby reducing the error rate in interpretation and improving the interpretability of focal mechanisms.
[0005] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a three-dimensional visualization method for seismic source mechanisms based on a multi-coordinate system-mapping approach. The method includes: constructing a coordinate system converter based on the positional mapping relationship of a coordinate system set; the coordinate system set includes at least: NED coordinate system, ENU coordinate system, XYZ coordinate system, and spherical coordinate system; acquiring the surface mesh data of the target seismic source sphere after mapping by the coordinate system converter, and outputting it as the mapped coordinate data; determining the display mode according to user requirements, and using the mapped coordinate data to perform partitioned color rendering on the surface of the target seismic source sphere to obtain a partitioned color rendering layer; the display mode includes at least an amplitude mode; the amplitude mode is an operation mode that first performs a clip operation and then performs solid color rendering; using the tube method to perform three-dimensional pipelined rendering of nodal lines to obtain a nodal line rendering layer; the nodal line is the intersection line between the nodal surface and the target seismic source sphere when the surface of the target seismic source sphere is partitioned, and the nodal line is used to characterize the position where the initial amplitude of the seismic wave is zero; and rendering using standardized color-coded principal stress axes to obtain a principal stress axis rendering layer; the principal stress... The axes include: P-axis, T-axis, and B-axis; wherein, the P-axis is the pressure axis, which is used to characterize the direction of the maximum principal compressive stress; the T-axis is the tension axis, which is used to characterize the direction of the maximum principal stress; the B-axis is the neutral axis, which is perpendicular to the P-axis and the T-axis; a dual-coordinate system real-time display indicator is configured between the NED coordinate system and the XYZ coordinate system through a coordinate system converter, and the target seismic source sphere is rotated synchronously in the main view using the dual-coordinate system real-time display indicator to obtain a dual-coordinate system synchronous layer; the dual-coordinate system real-time display indicator is used to determine the positional correspondence between the NED coordinate system and the XYZ coordinate system without needing to memorize the coordinate correspondence, but only through a visual comparison mechanism; the partitioned color rendering layer, nodal line rendering layer, principal stress axis rendering layer, and dual-coordinate system synchronous layer are overlaid and fused to obtain a three-dimensional visualization result; based on the three-dimensional visualization result, a human-computer interaction interface is designed for the GUI graphical user interface to obtain an interface design strategy; the three-dimensional visualization result is visualized using the GUI graphical user interface according to the interface design strategy.
[0006] In a second aspect, this application also provides a computer system, 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 three-dimensional visualization method for source mechanisms based on multi-coordinate system-mapping as described in the first aspect.
[0007] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application constructs a coordinate system converter encompassing NED, ENU, XYZ, and spherical coordinate systems; determines the display mode based on user needs; performs partitioned color rendering of the sphere; employs the tube method for 3D pipelined rendering of nodal lines; renders principal stress axes using standardized color coding; and achieves synchronous rotation of the main view by configuring real-time display indicators for both NED and XYZ coordinate systems. All rendering layers are merged to generate a 3D visualization result image, and interactive visualization is achieved based on a GUI graphical user interface. This application eliminates coordinate confusion caused by different software and disciplinary backgrounds, solves the problem of color penetration near nodal lines in traditional interpolation coloring methods, and improves boundary clarity. The 3D visualization result image of this application can be displayed synchronously and rotated in conjunction with the 3D view, enabling real-time verification of coordinate correspondences from any viewpoint, reducing the error rate in interpretation without relying on memory or consulting documents. Furthermore, this application can analyze the focal mechanism from engineering perspectives such as the working face advance direction, roadway direction, and coal seam dip, comprehensively understanding the 3D spatial characteristics of the focal mechanism and improving its interpretability. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 This is a coordinate system mapping diagram provided for an embodiment of this application.
[0010] Figure 2 A schematic diagram illustrating the transformation between spherical coordinates and Cartesian coordinates provided in an embodiment of this application.
[0011] Figure 3 A flowchart of the coloring algorithm provided in an embodiment of this application.
[0012] Figure 4 This is a schematic diagram of the GUI interface layout provided in an embodiment of this application.
[0013] Figure 5 This is a flowchart illustrating a three-dimensional visualization method for seismic source mechanisms based on a multi-coordinate system-mapping, provided in an embodiment of this application.
[0014] Figure 6 This is an internal structure diagram of a computer system provided in an embodiment of this application. Detailed Implementation
[0015] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0016] Table 1 shows the technical terms used in this application, as follows.
[0017] Table 1. Technical Terms and Definitions Comparison Table
[0018] The existing visualization techniques for focal mechanisms have the following problems.
[0019] 1. Coordinate system confusion: Seismology uses the NED (North-East-Down) coordinate system, mining surveying uses a mine-specific coordinate system, while computer graphics software generally uses the Cartesian XYZ coordinate system. There is a lack of clear and unified mapping standards among the three. Especially in coal mine applications, the direction of "depth increase" is opposite to the "positive Z-axis direction" in graphics software, which can easily lead to conceptual confusion and data interpretation errors.
[0020] 2. Blurred Polar Boundary: In Polarity display mode, the source sphere needs to clearly distinguish between compression (red) and dilatation (blue) regions. Traditional interpolation coloring methods (such as interpolate_before_map) or point_data_to_cell_data methods can cause color bleeding near the nodal lines, resulting in blurred boundaries between compression and dilatation regions and affecting the accurate interpretation of nodal attitude.
[0021] 3. Insufficient 3D interactivity: Traditional 2D projection maps are static images and cannot support real-time rotation observation at any angle. For complex seismic sources (such as non-double-couple seismic sources containing CLVD components), users find it difficult to fully understand their 3D spatial characteristics from a single perspective.
[0022] 4. Difficulty in Coordinate Verification: When using 3D visualization results, users often find it difficult to intuitively determine whether the displayed coordinate directions correctly correspond to the physical coordinate system (NED) or the actual location of the mine. Incorrect coordinate interpretation can lead to serious data misinterpretation errors, which is particularly dangerous in coal mine safety decision-making scenarios.
[0023] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0024] Example 1, as Figure 5 As shown in the figure, this embodiment provides a three-dimensional visualization method for seismic source mechanisms based on multi-coordinate system-mapping, the method including the following steps.
[0025] S1. As Figure 1 As shown, a coordinate system converter is constructed based on the position mapping relationship of a set of coordinate systems; the set of coordinate systems includes at least: NED coordinate system, ENU coordinate system, XYZ coordinate system and spherical coordinate system.
[0026] In practical applications, Figure 2 This illustrates the unified mapping between the Cartesian coordinate system (XYZ) and the seismic coordinate system (NED). The X-axis corresponds to the East direction, the Y-axis to the North direction, and the positive Z-axis to the Up (i.e., negative Down) direction. The "increase in depth" is specifically marked to correspond to the Z- direction. The zenith angle θ is measured from the Z+ axis, and the azimuth angle is also shown. Measured from the X+ axis in the XY plane, and the conversion formula is given.
[0027] As shown in Table 2, there are multiple coordinate system conventions in the representation of focal mechanisms. Different literature and software use different coordinate systems, which mainly include: Table 2. Coordinate system axial definitions
[0028] As shown in Table 3, this application establishes a unified mapping relationship based on NED, transforming each coordinate system to the Cartesian XYZ coordinate system: Table 3. Transformation relationship between NED and XYZ coordinate system
[0029] As shown in Table 4, the transformation relationships between each coordinate system and NED are as follows: Table 4. Transformation Relationship between Coordinate System and NED
[0030] The equivalent mathematical expressions are: X=E, Y=N, Z=-D=Up.
[0031] This mapping provides a unified coordinate reference for all subsequent data processing and visualization. In coal mine applications, "increased depth" corresponds to the Z-direction, which clearly corresponds to the Z-axis direction in graphics software, eliminating conceptual confusion.
[0032] Transformation from spherical coordinates to Cartesian coordinates.
[0033] like Figure 2 The spherical coordinates (r, θ, are shown) Transformation from Z+ axis to Cartesian coordinates (x, y, z). Label the zenith angle θ, measured from the Z+ axis, and the azimuth angle... Measured from the X+ axis in the XY plane, and the conversion formula is given. The principal stress axes (P / T / B axes) of the focal mechanism are usually expressed in spherical coordinates (r, θ, ...). Given in the form of ), it needs to be converted to Cartesian coordinates (x, y, z), as shown in the following formula.
[0034] .
[0035] Where: r is the radial distance (r=1 for a unit sphere), and θ is the zenith angle (measured from the Z+ axis, ranging from [0° to 180°]). The azimuth angle (measured counterclockwise from the X+ axis, ranging from [0° to 360°]).
[0036] This transformation allows the principal stress axis direction to be correctly located in the Cartesian coordinate system, facilitating comparative analysis with the mining area space.
[0037] S2. Obtain the surface mesh data of the target seismic source sphere after mapping by the coordinate system converter, and output it as the mapped coordinate data.
[0038] Furthermore, the mapped coordinate data is: source parameter data obtained from moment tensor inversion or source parameter data exported from a mine microseismic monitoring system.
[0039] Furthermore, the source parameter data obtained by the moment tensor inversion are obtained as follows.
[0040] 1) Use the symmetric moment tensor to perform eigenvalue decomposition to obtain the principal stress axes, and transform the direction of the principal stress axes from the NED coordinate system to the XYZ coordinate system.
[0041] 2) Generate regular grid points on the unit sphere to form a regular grid, calculate the Cartesian coordinates and initial amplitude of the seismic wave for each grid point, and determine the polarity based on the sign of the amplitude.
[0042] 3) Extract the contour lines with zero amplitude as nodal lines, convert the spherical coordinate system of the nodal lines to the XYZ coordinate system, and generate the three-dimensional line segment geometric data of the nodal lines.
[0043] 4) Export the principal stress axes, grid, nodal lines and their corresponding labels of the spherical surface to obtain the source parameter data obtained by moment tensor inversion.
[0044] Furthermore, the source parameter data obtained from the moment tensor inversion is in VTK format.
[0045] In practical applications, MATLAB is usually used to generate the source sphere mesh and export it using VTK. The specific process is as follows.
[0046] 1) Step M1 Moment Tensor Input and Eigenvalue Decomposition.
[0047] Read the moment tensor data M (3×3 symmetric matrix) of the focal mechanism and perform eigenvalue decomposition to obtain the principal stress axis directions: Call the eig(M) function to obtain the eigenvalues λ1, λ2, λ3 and their corresponding eigenvectors.
[0048] The P-axis (maximum compression), T-axis (maximum stretch), and B-axis (neutral) are determined by sorting the absolute values of the eigenvalues.
[0049] Transform the feature vector from the NED coordinate system to the XYZ coordinate system (by applying the mapping relationship).
[0050] 2) Step M2 Source Sphere Surface Mesh Generation.
[0051] Generate regular grid points on a unit sphere and calculate the initial motion amplitude of the seismic wave at each point: Use meshgrid to generate θ∈[0,π]. A regular grid ∈ [0, 2π] (100×100 resolution recommended).
[0052] The Cartesian coordinates (x, y, z) of each grid point are calculated using the spherical coordinate transformation formula.
[0053] The amplitude value (Amplitude) at each point is calculated using the formula for the radiation pattern of the moment tensor.
[0054] The polarity value (+1 or -1) is determined based on the sign of the amplitude.
[0055] Amplitude calculation formula (double couple radiation pattern): A(θ, )=sin(2θ)cos( ).
[0056] For the full-moment tensor, amplitude calculations need to consider the superposition contributions of the DC, CLVD, and ISO components.
[0057] 3) Step M3 section line geometry calculation.
[0058] The nodal lines are contour lines with Amplitude = 0, extracted using the following method: Use the contour function to extract contour lines with Amplitude=0 on a spherical grid.
[0059] Convert the contour line coordinates from spherical coordinates to Cartesian coordinates.
[0060] Generate the three-dimensional line segment geometry data of the nodal line.
[0061] 4) Export the M4VTK format file.
[0062] Export the generated 3D mesh data in VTK format for easier subsequent visualization processing: (1) Spherical mesh file (_surface.vtk): File format: VTK Polydata format.
[0063] Geometric data: The POINTS section contains the coordinates (x, y, z) of all vertices.
[0064] Topology data: The POLYGONS section defines the connection relationships between triangle faces.
[0065] Scalar data: The POINT_DATA section contains two scalar fields: Amplitude (float) and Polarity (int).
[0066] (2) Nodal lines file (_nodal_lines.vtk): File format: VTK Polydata format.
[0067] Geometric data: The POINTS section contains the coordinates of discrete points along the nodal line.
[0068] Topology data: The LINES section defines the connection relationships between line segments.
[0069] (3) Principal stress axis file (_arrows_geometry.vtk): File format: VTK Polydata format.
[0070] Geometric data: includes the start and end coordinates of the P / T / B axes.
[0071] Additional data: axis name label, color index.
[0072] (4) Label data file (_labels.csv): File format: CSV comma-separated format.
[0073] Data content: axis name, endpoint coordinates, display label text.
[0074] Example of VTK file structure: File header: #vtk DataFile Version 3.0.
[0075] Data description: Focal Mechanism Beachball Surface.
[0076] Data format: ASCII.
[0077] Dataset type: DATASET POLYDATA.
[0078] Vertex data: POINTS 10201 float (followed by xyz coordinates).
[0079] Patch data: POLYGONS 20000 80000 (followed by vertex index).
[0080] Point attribute: POINT_DATA 10201.
[0081] Amplitude scalar: SCALARS Amplitude float 1.
[0082] Polar scalar: SCALARS Polarity int 1.
[0083] Responsible for calculating and generating the raw data for the focal mechanism, providing the data foundation for subsequent visualization: Moment tensor input and decomposition: Receive 6 independent moment tensor components (Mxx, Myy, Mzz, Mxy, Mxz, Myz), use the eig() function to perform eigenvalue decomposition, and obtain the direction and magnitude of the principal stress axes P / T / B.
[0084] S3. Determine the display mode according to user needs, and use the mapped coordinate data to perform partitioned color rendering on the surface of the target seismic source sphere to obtain a partitioned color rendering layer; the display mode includes at least an amplitude mode; the amplitude mode is an operation mode that first performs a clip operation and then performs solid color rendering.
[0085] Furthermore, the rendering process of the partitioned shading rendering layer in the amplitude mode is as follows: 1) Based on the mapped coordinate data, the clip scalar method is used to divide the surface of the target seismic source sphere into partitions using continuous amplitude values as the dividing criteria, resulting in positive and negative value grids; the positive value grids represent the expansion zone; and the negative value grids represent the compression zone.
[0086] 2) Use dark blue to color the expansion area and dark red to color the compression area.
[0087] 3) Add the colored positive and negative grids to the rendering scene simultaneously to obtain a partitioned colored rendering layer.
[0088] In practical applications, Figure 3 The processing flow of the core algorithm of this invention is shown: original mesh data → clip_scalar splitting (threshold Amplitude=0) → positive value mesh (blue coloring) + negative value mesh (red coloring) → merge rendering (precise alignment of boundaries with nodal surfaces).
[0089] Traditional interpolation coloring methods cannot form accurate boundaries at the boundaries of discrete polarity values (±1). This invention adopts the following three-step algorithm: 1) Mesh partitioning: The clip_scalar method is used, with continuous amplitude values as the partitioning basis, and the threshold is set to 0.0. Call clip_scalar(scalars='Amplitude',value=0.0,invert=False) to get the positive grid (Amplitude>0).
[0090] Calling clip_scalar(scalars='Amplitude',value=0.0,invert=True) retrieves negative value grids (Amplitude<0). Using continuous Amplitude values instead of discrete Polarity values as the basis for segmentation can yield more accurate segmentation boundaries because the isosurface with Amplitude=0 corresponds exactly to the nodal surface position.
[0091] 2) Partition coloring: Apply a solid color to each of the two mesh portions after partitioning. Positive grid (expansion zone): Use dark blue (#00008B).
[0092] Negative grid (compressed area): Use dark red (#8B0000).
[0093] 3) Mesh merging rendering: Add the two shaded meshes to the rendering scene simultaneously.
[0094] The algorithm ensures that the boundaries of the compression and expansion zones are precisely aligned with the nodal surfaces, resulting in clear and sharp boundaries without any color penetration.
[0095] S4. Use the tube method to perform three-dimensional pipelined rendering of the nodal lines to obtain a nodal line rendering layer; the nodal lines are the intersection lines between the nodal surfaces and the target seismic source sphere when the surface of the target seismic source sphere is divided into sections, and the nodal lines are used to characterize the positions where the initial amplitude of the seismic wave is zero.
[0096] Further, step S4 specifically includes: setting the pipe radius and circumferential resolution by calling the tube method, coloring the nodal lines black, and rendering a nodal line rendering layer.
[0097] Furthermore, nodal lines are the intersections of nodal surfaces and the surface of the source sphere, representing the locations where the initial amplitude of the seismic wave is zero. The original line geometry is easily obscured by the sphere in a 3D scene; this application converts it into a volumetric 3D pipe geometry, as detailed below.
[0098] Call the `tube` method and set the pipe radius (radius=0.004 is recommended).
[0099] Set the circumferential resolution (n_sides=20 is recommended).
[0100] Using black-colored pipelining ensures that nodal lines are clearly visible from any viewing angle, making it easier to determine the nodal surface orientation.
[0101] S5. Render using standardized color-coded principal stress axes to obtain a principal stress axis rendering layer; the principal stress axes include: P-axis, T-axis and B-axis; wherein, the P-axis is the pressure axis, which is used to characterize the direction of the maximum principal compressive stress; the T-axis is the tension axis, which is used to characterize the direction of the maximum principal compressive stress; the B-axis is the neutral axis, which is perpendicular to the P-axis and the T-axis.
[0102] Furthermore, step S5 specifically includes: marking the P-axis in red; marking the T-axis in blue; and marking the B-axis in green.
[0103] S6. Configure a dual-coordinate system real-time display indicator between the NED coordinate system and the XYZ coordinate system through a coordinate system converter, and use the dual-coordinate system real-time display indicator to synchronously rotate the main view of the target seismic source sphere to obtain a dual-coordinate system synchronous layer; the dual-coordinate system real-time display indicator is used to determine the positional correspondence between the NED coordinate system and the XYZ coordinate system without having to memorize the coordinate correspondence, but only through a visual comparison mechanism.
[0104] In practical applications, two coordinate system indicators are displayed simultaneously in the 3D view interface, as shown below.
[0105] NED coordinate system indicator (located in the lower left corner of the view): E-axis is labeled "E(East)"; N-axis is labeled "N(North)"; Up-axis is labeled "Up(-Down)".
[0106] XYZ coordinate system indicator (located in the lower right corner of the view): X-axis, Y-axis, and Z-axis are labeled respectively.
[0107] Two coordinate system indicators rotate synchronously with the 3D view, allowing users to verify the correspondence between the NED and XYZ coordinate systems in real time by observing the relative positions of the two indicators. This visual comparison mechanism enables users to confirm the correctness of the display without having to memorize coordinate correspondences.
[0108] S7. Overlay and blend the partitioned color rendering layer, nodal line rendering layer, principal stress axis rendering layer, and dual coordinate system synchronization layer to obtain a 3D visualization result.
[0109] S8. Based on the 3D visualization results, design the human-computer interaction interface for the GUI graphical user interface and obtain the interface design strategy.
[0110] S9. Using a GUI (Graphical User Interface), visualize the 3D visualization results according to the interface design strategy.
[0111] Furthermore, the human-computer interaction interface design specifically includes: Interface layout design, control panel component configuration, signal slot connection mechanism linkage, and embedding the PyVista rendering window into the Qt interface.
[0112] In practical applications, the implementation process of a GUI (Graphical User Interface) is as follows.
[0113] Figure 4 The user interface layout is shown: a left-side control panel (file management, display control, color scheme selection), a central 3D visualization area (source sphere, nodal lines, principal stress axes), a lower-left NED coordinate system indicator, and a lower-right XYZ coordinate system indicator. The Qt interface component hierarchy is: MainWindow → left-side QDockWidget control panel (including QGroupBox groups) → central QtInteractor rendering area → QStatusBar status bar. The two coordinate system indicators rotate synchronously with the 3D view, allowing users to visually verify that the correspondence between EX, NY, and Up-Z always holds true from any viewpoint.
[0114] This application uses the Qt framework (via PyQt5 or PySide6) to build a graphical user interface and implement human-computer interaction functions: 1) Interface layout design.
[0115] It adopts a classic three-column layout: Left control panel (QDockWidget): approximately 200 pixels wide, containing all control components. Central visualization area (QVTKRenderWindowInteractor): the main display area, embedded in the PyVista rendering window. Bottom status bar (QStatusBar): displays the current operation status and coordinate information.
[0116] 2) Control Panel Components.
[0117] (1) File Management Group (QGroupBox): Load button (QPushButton): Triggers the file selection dialog QFileDialog. Load VTK file event list (QListWidget): Displays the list of loaded source mechanisms. Event toggle: Clicking a list item switches between displaying different source mechanisms.
[0118] (2) Display control group (QGroupBox): Source sphere checkbox (QCheckBox): Controls the display / hide of nodal lines on the sphere. PTB axis checkbox (QCheckBox): Controls the display / hide of principal stress axes. NED coordinate system checkbox (QCheckBox): Controls the display / hide of the NED indicator. XYZ coordinate system checkbox (QCheckBox): Controls the display / hide of the XYZ indicator.
[0119] (3) Color scheme group (QGroupBox): Mode selection dropdown (QComboBox): Polarity mode / Amplitude mode switching color map selection dropdown (QComboBox): RdBu_r / coolwarm / viridis and other color map switching (4) View control group (QGroupBox): Top view button (QPushButton): camera.position is set to (0,0,3).
[0120] Front view button (QPushButton): camera.position is set to (0,-3,0).
[0121] Side view button (QPushButton): camera.position is set to (3,0,0).
[0122] Isometric button (QPushButton): camera.position is set to (2,2,2).
[0123] Transparency slider (QSlider): Adjusts the transparency of the sphere from 0.0 to 1.0.
[0124] (5) Export function group (QGroupBox): Screenshot button (QPushButton): Calls plotter.screenshot() to export a PNG image.
[0125] Resolution settings (QSpinBox): Set the resolution of the exported image.
[0126] 3) Signal slot connection mechanism.
[0127] Qt's signal and slot mechanism enables the interaction between controls and the renderer: The checkbox stateChanged signal corresponds to the actor's SetVisibility() method.
[0128] The dropdown menu's currentIndexChanged signal triggers a recoloring and rendering.
[0129] The slider's valueChanged signal is passed to the actor's GetProperty().SetOpacity() method.
[0130] The button's clicked signal corresponds to its functional group.
[0131] 4) PyVista integration with Qt.
[0132] Using the pyvistaqt module to embed a PyVista rendering window into a Qt interface: Create a QtInteractor object to replace the standard Plotter.
[0133] Add the QtInteractor as a QWidget to the main window layout.
[0134] Access all PyVista rendering features through QtInteractor.
[0135] Example of main window class structure: classMainWindow(QMainWindow): Inherits from the Qt main window class.
[0136] self.plotter=QtInteractor(self): Creates a PyVistaQt renderer.
[0137] self.setCentralWidget(self.plotter): Sets the central widget.
[0138] self.create_control_panel(): Creates the left-side control panel.
[0139] self.load_and_render(): Loads data and renders it.
[0140] Furthermore, after step S9, the method further includes: taking the goal of equal area regions on the sphere on the projection plane as the objective, performing two-dimensional projection mapping on the three-dimensional visualization result map to obtain a two-dimensional Schmidt projection map, and using the two-dimensional Schmidt projection map to verify the positional relationship of the three-dimensional visualization result map.
[0141] In practical applications, the Schmidt projection principle states that equal-area projection ensures that regions of the same area on the sphere have equal areas on the projection plane.
[0142] Projection formula (lower hemisphere projection): .
[0143] Where θ is the zenith angle (measured from the Z-axis). Let r' be the azimuth angle, r' be the projection radius, and (x', y') be the coordinates of the projection plane. MATLAB implementation steps: Generate grid points for the lower hemisphere (θ∈[π / 2,π]).
[0144] Calculate two-dimensional coordinates using the Schmidt projection formula.
[0145] Draw the compression area (filled in red) and the expansion area (filled in blue).
[0146] Overlay nodal lines (black curves) and P / T / B axis projection points.
[0147] Add a azimuth scale ring and N / E / S / W azimuth markings.
[0148] This embodiment also provides an example of using the PyVista library (a Python wrapper based on VTK) to implement 3D visualization rendering. The specific implementation steps are as follows: Step P1: Load VTK data.
[0149] Reading VTK format files exported from MATLAB: Call the pv.read() function to load the spherical mesh file (_surface.vtk).
[0150] The pv.read() function is called to load the nodal line geometry file (_nodal_lines.vtk).
[0151] The pv.read() function is called to load the principal stress axis file (_arrows_geometry.vtk).
[0152] Read the CSV file to obtain label data.
[0153] Verify data integrity: Check if the number of points, faces, and scalar fields are correct. PyVista data loading example: surface=pv.read("01_DC_StrikeSlip_surface.vtk").
[0154] nodal_lines=pv.read("01_DC_StrikeSlip_nodal_lines.vtk").
[0155] arrows=pv.read("01_DC_StrikeSlip_arrows_geometry.vtk").
[0156] Step P2: Polarity mode precise coloring.
[0157] The core of this invention is the clip_scalar segmentation and coloring algorithm: Call surface.clip_scalar(scalars='Amplitude',value=0.0,invert=False) to get the positive value grid.
[0158] Call surface.clip_scalar(scalars='Amplitude',value=0.0,invert=True) to get the negative value grid.
[0159] Set the positive grid to a solid dark blue (#00008B) color.
[0160] Set the negative value grid to a solid dark red (#8B0000) color.
[0161] PyVista shading implementation: positive_mesh=surface.clip_scalar(scalars='Amplitude',value=0.0,invert=False).
[0162] negative_mesh=surface.clip_scalar(scalars='Amplitude',value=0.0,invert=True).
[0163] plotter.add_mesh(positive_mesh,color='#00008B').
[0164] plotter.add_mesh(negative_mesh,color='#8B0000').
[0165] Step P3: Pipeline rendering.
[0166] Convert line geometry into a 3D pipe: Call nodal_lines.tube(radius=0.004,n_sides=20) to generate the pipe geometry.
[0167] Set the color to black and add it to the scene.
[0168] PyVista pipeline implementation: tube=nodal_lines.tube(radius=0.004,n_sides=20).
[0169] plotter.add_mesh(tube,color='black').
[0170] Step P4: Render the principal stress axis arrows.
[0171] Render the arrow geometry of the P / T / B axes: Create a cylinder (shaft) and a cone (arrow) for each axis.
[0172] Coloring is done according to standard color coding: red for the P-axis, blue for the T-axis, and green for the B-axis.
[0173] Use plotter.add_point_labels() to add text labels to the ends of the axes.
[0174] Step P5 - Configure the dual coordinate system widget.
[0175] Configure NED and XYZ dual coordinate system indicators: Call plotter.add_axes() to add the first coordinate system widget (NED).
[0176] Set the axis labels to "E(East)", "N(North)", and "Up(Down)".
[0177] Set the Widget position to the bottom left corner of the viewport=(0,0,0.2,0.2).
[0178] Add a second coordinate system widget (XYZ) to the bottom right corner viewport=(0.8,0,1.0,0.2).
[0179] The two widgets rotate in sync with the main view.
[0180] Step P6: Interactive control configuration.
[0181] Configure view interaction features: Set the initial camera position (camera.position) and viewpoint.
[0182] Enable mouse drag rotation and scroll wheel zoom.
[0183] Configure preset view switching (Top / Front / Side / Isometric).
[0184] Configure the screenshot export function using plotter.screenshot().
[0185] The technical effects of this application are as follows: 1) Coordinate System Uniformity: For the first time, a complete and unified mapping relationship between NED / ENU / XYZ / spherical coordinates (X=E, Y=N, Z=Up=-D) was established, eliminating the coordinate confusion problem between different software and different disciplines, enabling seismic data to be displayed correctly and consistently in computer graphics environments. This mapping relationship is applicable to various application scenarios such as natural earthquake research and coal mine seismic monitoring.
[0186] 2) Polar Boundary Accuracy: By employing the clip_scalar method to divide the mesh at Amplitude=0 and then coloring the resulting zones, the problem of color bleeding near nodal lines in traditional interpolation coloring methods is completely solved. Testing shows that the compression / expansion zone boundaries generated by this method perfectly match the mathematically calculated nodal surface positions, with a 100% improvement in boundary clarity (from gradient boundaries to sharp boundaries), providing a reliable basis for the accurate interpretation of nodal surface orientation and dip angle.
[0187] 3) Real-time coordinate verification: Through the technical solution of synchronous display of dual coordinate system indicators and linkage rotation with the 3D view, users can verify the coordinate correspondence in real time from any perspective without relying on memory or consulting documents. This can reduce data interpretation errors caused by misunderstanding of coordinates by more than 90%.
[0188] 4) Enhanced 3D interactivity: Supports real-time rotation observation at any angle, and provides a variety of preset views such as top view, front view, side view, and isometric view. Users can analyze the source mechanism from engineering perspectives such as the working face advance direction, roadway direction, and coal seam dip, and fully understand the three-dimensional spatial characteristics of the source mechanism.
[0189] Example 2: This example provides a computer system, which can be a server or a terminal, and its internal structure diagram can be as follows. Figure 6As shown, the computer system includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores forced oscillation samples and sub / supersynchronous oscillation samples. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the aforementioned method for rapid prediction and identification of the dominant frequency of sub / supersynchronous oscillations in new energy power systems based on transfer learning.
[0190] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer system to which the present application is applied. A specific computer system may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0191] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0192] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0193] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0194] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A three-dimensional visualization method for seismic source mechanisms based on multi-coordinate system-mapping, characterized in that, The method includes: A coordinate system transformer is constructed based on the position mapping relationship of a set of coordinate systems; the set of coordinate systems includes at least: NED coordinate system, ENU coordinate system, XYZ coordinate system and spherical coordinate system; Obtain the surface mesh data of the target seismic source sphere after mapping by the coordinate system converter, and output it as the mapped coordinate data. The display mode is determined according to user needs, and the surface of the target seismic source sphere is partitioned and colored using the mapped coordinate data to obtain a partitioned colored rendering layer; the display mode includes at least an amplitude mode; the amplitude mode is an operation mode that first performs a clip operation and then performs solid color coloring. The tube method is used to perform three-dimensional pipelined rendering of the nodal lines to obtain a nodal line rendering layer; the nodal lines are the intersection lines between the nodal surfaces and the target seismic source sphere when the surface of the target seismic source sphere is divided into sections, and the nodal lines are used to characterize the positions where the initial amplitude of the seismic wave is zero. A standardized color-coded principal stress axis is used for rendering to obtain a principal stress axis rendering layer; the principal stress axis includes: P-axis, T-axis and B-axis; wherein, the P-axis is the pressure axis, which is used to characterize the direction of the maximum principal compressive stress; the T-axis is the tension axis, which is used to characterize the direction of the maximum principal compressive stress; the B-axis is the neutral axis, which is perpendicular to the P-axis and the T-axis; A dual-coordinate system real-time display indicator is configured between the NED coordinate system and the XYZ coordinate system using a coordinate system converter. The target seismic source sphere is rotated synchronously in the main view using the dual-coordinate system real-time display indicator to obtain a dual-coordinate system synchronized layer. The dual-coordinate system real-time display indicator is used to determine the positional correspondence between the NED coordinate system and the XYZ coordinate system through a visual comparison mechanism without having to memorize the coordinate correspondence. The partition shading rendering layer, nodal line rendering layer, principal stress axis rendering layer and dual coordinate system synchronization layer are overlaid and blended to obtain a 3D visualization result. Based on the 3D visualization results, the human-computer interaction interface of the GUI is designed, and the interface design strategy is obtained. Using a GUI (Graphical User Interface), the 3D visualization results are displayed according to the interface design strategy.
2. The three-dimensional visualization method for seismic source mechanisms based on multi-coordinate system-mapping as described in claim 1, characterized in that, After visualizing the 3D visualization result using a GUI graphical user interface and following the interface design strategy, the process also includes: taking the goal of equal area regions on the sphere having equal area on the projection plane, performing a 2D projection mapping on the 3D visualization result to obtain a 2D Schmidt projection map, and using the 2D Schmidt projection map to verify the positional relationship of the 3D visualization result.
3. The three-dimensional visualization method for seismic source mechanisms based on multi-coordinate system-mapping as described in claim 1, characterized in that, The mapped coordinate data are: source parameter data obtained from moment tensor inversion or source parameter data exported from a mine microseismic monitoring system.
4. The three-dimensional visualization method for seismic source mechanisms based on multi-coordinate system-mapping as described in claim 3, characterized in that, The source parameter data obtained by the moment tensor inversion are as follows: The principal stress axes are obtained by eigenvalue decomposition using the symmetric moment tensor, and the directions of the principal stress axes are transformed from the NED coordinate system to the XYZ coordinate system. Generate regular grid points on a unit sphere to form a regular grid, calculate the Cartesian coordinates and initial amplitude of the seismic wave for each grid point, and determine the polarity based on the sign of the amplitude. Extract contour lines with zero amplitude as nodal lines, convert the spherical coordinate system of the nodal lines to the XYZ coordinate system, and generate the three-dimensional geometric data of the nodal lines. Export the principal stress axes, grid, nodal lines, and their corresponding labels to obtain the source parameter data obtained from the moment tensor inversion.
5. The three-dimensional visualization method for seismic source mechanisms based on multi-coordinate system-mapping as described in claim 3, characterized in that, The source parameter data obtained from the moment tensor inversion are in VTK format.
6. The three-dimensional visualization method for seismic source mechanisms based on multi-coordinate system-mapping according to claim 1, characterized in that, The rendering process of the partitioned shading rendering layer in the amplitude mode is as follows: Based on the mapped coordinate data, the clip scalar method is used to partition the surface of the target seismic source sphere using continuous amplitude values as the dividing criteria, resulting in positive and negative value grids. The positive value grids represent the expansion region, and the negative value grids represent the compression region. Use dark blue to color the expansion area and dark red to color the compression area; Add the colored positive and negative grids to the rendering scene simultaneously to obtain a partitioned colored rendering layer.
7. The three-dimensional visualization method for seismic source mechanisms based on multi-coordinate system-mapping according to claim 1, characterized in that, The tube method is used to perform 3D pipelined rendering of nodal lines, resulting in nodal line rendering layers, specifically including: The tube method is called to set the pipe radius and circumference resolution, and the nodal lines are colored black to obtain the nodal line rendering layer.
8. The three-dimensional visualization method for seismic source mechanisms based on multi-coordinate system-mapping according to claim 1, characterized in that, The principal stress axes are rendered using standardized color coding to obtain a principal stress axis rendering layer, which specifically includes: red marking for the P-axis; blue marking for the T-axis; and green marking for the B-axis.
9. The three-dimensional visualization method for seismic source mechanisms based on multi-coordinate system-mapping according to claim 1, characterized in that, The human-computer interaction interface design specifically includes: Interface layout design, control panel component configuration, signal slot connection mechanism linkage, and embedding the PyVista rendering window into the Qt interface.
10. A computer system, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the three-dimensional visualization method of source mechanism based on multi-coordinate system-mapping as described in any one of claims 1-9.