3D polarization teaching all-in-one machine control system based on human-computer interaction
By constructing a node topology graph and performing real-time path retrieval, the problem of disconnect between interactive commands and hardware control in the 3D polarization teaching all-in-one machine was solved, enabling real-time synchronous updates of polarization filter voltage and rendering parameters, thus improving the real-time performance and accuracy of the system response.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN ZHONGKESIDA TECH CO LTD
- Filing Date
- 2026-05-12
- Publication Date
- 2026-07-31
AI Technical Summary
When teachers perform continuous and nonlinear complex polarization experiments, the existing three-dimensional polarization teaching integrated machine control system cannot reconstruct the control logic in real time using the preset static mapping script, resulting in system response delays and a disconnect between interactive commands and hardware control.
A parameter mapping component is used to construct a node topology graph. An interaction recognition component is used to convert gesture trajectories into polarization parameter change events. An event-driven engine is used to perform path retrieval in the node topology graph, generate intermediate code, and translate it into underlying hardware control instructions by an intermediate code interpreter. This enables real-time synchronization of polarization filter voltage adjustment and rendering engine parameter updates.
It achieves real-time calculation of continuous human-computer interaction actions to node paths, solves the problem of disconnect between interaction commands and hardware control, reduces the impact of noise interference, and ensures the synchronization of polarization hardware timing signals with the updated rendering screen, thus avoiding screen tearing.
Smart Images

Figure CN122493719A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of human-computer interaction technology, and more specifically to a control system for a 3D polarization teaching all-in-one machine based on human-computer interaction. Background Technology
[0002] Existing 3D polarization teaching all-in-one machine control systems employ pre-defined instruction mapping scripts at the software program level for human-computer interaction. Teachers touch specific buttons on the screen or drag interface sliders, triggering the control program to capture these discrete touch events and call the corresponding polarization state switching function based on a pre-stored mapping table. The control program directly sends fixed level signal combinations to the polarization filter's driving circuit to change the polarization direction, simultaneously triggering the 3D rendering engine to read locally stored fixed parallax parameters for image updates. This software program execution logic is linear, with a static correspondence between touch events and underlying hardware control commands; the system executes polarization state switching in preset increments.
[0003] Based on the implementation methods of the above-mentioned existing technologies, when teachers perform continuous and nonlinear complex polarization experiments on the screen, the preset static mapping script cannot reconstruct the control logic in real time according to the continuously changing physical operation trajectory. This causes the system to respond to continuous human-computer interaction actions in discrete gears, resulting in delays and disconnections between the interactive commands and the underlying polarization hardware control. Summary of the Invention
[0004] The purpose of this invention is to provide a control system for a 3D polarization teaching all-in-one machine based on human-computer interaction, which can effectively solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: The human-computer interaction-based 3D polarization teaching all-in-one machine control system includes a parameter mapping component, an interaction recognition component, an event-driven engine, and an intermediate code interpreter. The parameter mapping component receives polarization experiment parameters input by the teacher, maps the polarizer rotation angle and polarization state to visual control nodes, and constructs a node topology graph containing the visual control nodes in memory. The interactive recognition component captures the teacher's gesture trajectory on the 3D polarized screen and converts the spatial coordinates of the gesture trajectory into polarization parameter change events. The event-driven engine extracts the source node and target node corresponding to the polarization parameter change event, performs path retrieval in the node topology graph, and generates intermediate code. The intermediate code interpreter translates the intermediate code into low-level hardware control instructions, which are used to drive the voltage adjustment of the left-eye polarizing filter and the right-eye polarizing filter of the 3D polarizing screen, and to synchronously drive the rendering engine to update the binocular parallax calculation parameters.
[0006] Preferably, when constructing the node topology graph, the parameter mapping component divides the polarizer rotation angle range into multiple discrete angle intervals, and each discrete angle interval corresponds to a visualization control node; The parameter mapping component calculates the change in light intensity transmittance between adjacent discrete angle intervals based on Malus's law in polarization optics. When the change in light intensity transmittance is greater than a preset threshold, a directed connection edge is established between the corresponding two adjacent visualization control nodes, and the change in light intensity transmittance is stored as the weight value of the directed connection edge in the adjacency table of the node topology graph.
[0007] Preferably, when the interaction recognition component converts the spatial coordinates of the gesture trajectory into the polarization parameter change event, it establishes a three-dimensional polar coordinate system with the initial touch point as the origin on the 3D polarization screen. The interactive recognition component extracts the radial distance change sequence and azimuth angle change sequence of the gesture trajectory in the three-dimensional polar coordinate system according to a preset time sampling interval; The interactive recognition component maps the radial distance change sequence to a polarizer rotation angle increment, maps the azimuth angle change sequence to a polarization state type switching identifier, and encapsulates the polarizer rotation angle increment and the polarization state type switching identifier into attribute fields of the polarization parameter change event.
[0008] Preferably, when the event-driven engine performs path retrieval in the node topology graph, it parses the polarization parameter change event to obtain the starting angle and the ending angle, and locates the source node that matches the starting angle and the target node that matches the ending angle in the node topology graph. The event-driven engine reads the adjacency list of the node topology graph, calculates the sum of path weights from the source node through each intermediate node to the target node, selects the node sequence with the smallest sum of path weights as the target path, and writes the node identifiers and connecting edge weights contained in the target path into the instruction segment of the intermediate code in the order of arrangement.
[0009] Preferably, when translating the underlying hardware control instructions, the intermediate code interpreter parses the instruction segments of the intermediate code to obtain the node identifiers and connection edge weights contained in the target path; The intermediate code interpreter converts the node identifier into the basic driving voltage value of the left eye polarization filter and the basic driving voltage value of the right eye polarization filter according to the preset voltage mapping lookup table, and converts the connection edge weight into the voltage adjustment step size. The intermediate code interpreter calculates the basic drive voltage value and the voltage adjustment step size by accumulating them according to the order of the target path, and generates the underlying hardware control instructions containing timing marks.
[0010] Preferably, when synchronously driving the rendering engine to update the binocular parallax calculation parameters, the underlying hardware control instructions include left eye voltage parameters and right eye voltage parameters; The rendering engine receives the underlying hardware control instructions and extracts the voltage difference between the left eye voltage parameter and the right eye voltage parameter; The rendering engine inputs the voltage difference into a preset disparity calculation function, which uses the voltage difference as the independent variable to calculate the left-eye camera offset matrix and the right-eye camera offset matrix. The rendering engine overwrites the left-eye camera offset matrix and the right-eye camera offset matrix into the rendering pipeline parameter stack of the current 3D scene.
[0011] Preferably, the parameter mapping component monitors the change in light intensity transmittance corresponding to each directed connection edge in the node topology graph in real time during the path retrieval process performed by the event-driven engine. When the change in light intensity transmittance of a directed connection edge is detected to be lower than the preset change threshold, the parameter mapping component deletes the record of the directed connection edge in the adjacency list and triggers the event-driven engine to interrupt the currently executing path retrieval task. Based on the updated adjacency list, the cumulative sum of path weights from the source node to the target node is recalculated to generate the updated target path.
[0012] Preferably, when the interactive recognition component extracts the radial distance change sequence and the azimuth angle change sequence, it establishes a sliding window containing multiple consecutive time sampling intervals; The interactive recognition component calculates the radial distance variance and azimuth variance of all sampling points within the sliding window. When the radial distance variance or the azimuth variance exceeds a preset variance threshold, the sampling point within the sliding window is determined to be a noise point and is removed. The interactive recognition component performs linear interpolation to complete the radial distance change sequence after removing the noise points, and generates the polarizer rotation angle increment based on the completed sequence.
[0013] Preferably, when the event-driven engine calculates the cumulative sum of path weights, it extracts the polarization state type corresponding to the current node and the next hop node for each hop node transition in the node topology graph. The event-driven engine queries a preset polarization state switching penalty table to obtain the penalty coefficient corresponding to switching from the current polarization state type to the next hop polarization state type. The penalty coefficient is multiplied by the weight of the connection edge between the current node and the next hop node. The product is used as the updated connection edge weight to participate in the subsequent path weight accumulation calculation. The penalty coefficient corresponding to switching between linear polarization state and circular polarization state in the polarization state switching penalty table is greater than the penalty coefficient corresponding to switching between polarization states of the same type.
[0014] Preferably, when the intermediate code interpreter generates the underlying hardware control instructions containing timing marks, it acquires the vertical synchronization signal output by the display driver board of the 3D polarized screen. The intermediate code interpreter uses the rising edge of the vertical synchronization signal as a time base to calculate the transmission time offset of the underlying hardware control instructions corresponding to each node in the target path. The intermediate code interpreter appends the transmission time offset to the data frame header of the corresponding underlying hardware control instruction, and controls the underlying hardware control instruction to be output to the driving electrodes of the left-eye polarizing filter and the right-eye polarizing filter during the display blanking period of the vertical synchronization signal.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. By mapping polarization experimental parameters to nodes and constructing a node topology graph containing connection edge weights, the spatial coordinates of gesture trajectories are transformed into polarization parameter change events. An event-driven engine performs path retrieval in the node topology graph to generate intermediate code, which is then translated into underlying hardware control instructions by an intermediate code interpreter. This node topology-based dynamic compilation architecture transforms continuous human-computer interaction actions into real-time calculation of node paths, changing the linear response mode of preset static scripts. This allows the voltage adjustment of the underlying polarization filter and the update of binocular parallax calculation parameters to be generated in real time following the interaction trajectory, solving the problem of disconnect between interaction instructions and hardware control.
[0016] 2. By introducing the change in light intensity transmittance as the weight of the connection edge in the node topology graph and monitoring and updating it in real time, combined with the removal of noise points in the gesture trajectory by sliding window, and the introduction of the polarization state switching penalty coefficient for path weight calculation, the impact of noise interference on polarization parameter calculation is reduced, so that the path retrieval results conform to the physical change law of polarization optics; based on the display blanking period of the vertical synchronization signal, the underlying hardware control command is sent to keep the polarization hardware timing signal synchronized with the screen update of the rendering pipeline, thus avoiding screen tearing. Attached Figure Description
[0017] Figure 1 The above is a flowchart of the overall control system of the 3D polarization teaching all-in-one machine based on human-computer interaction of the present invention. Figure 2 This is a flowchart illustrating the node topology graph construction and dynamic update process of the present invention. Figure 3 This is a flowchart of the gesture trajectory parsing and polarization parameter change event generation of the present invention; Figure 4 This is a flowchart of the event-driven engine path retrieval and weight optimization process of the present invention; Figure 5 This is a flowchart of the intermediate code translation and underlying hardware instruction generation process of the present invention; Figure 6 This is a flowchart of the binocular parallax parameter update process for the rendering engine of this invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Please refer to Figure 1 This embodiment provides a control system for a 3D polarization teaching all-in-one machine based on human-computer interaction. The main control processing unit of the 3D polarization teaching all-in-one machine is electrically connected to the touch detection module, polarization filter driving circuit, and graphics rendering unit of the 3D polarization screen. The memory space of the main control processing unit is used to store the adjacency list structure of the node topology graph, the intermediate code cache queue, and the hardware control instruction buffer. The control system includes a parameter mapping component, an interaction recognition component, an event-driven engine, and an intermediate code interpreter. Data interaction between the components and the engine is achieved through a shared memory area.
[0020] Specifically, the parameter mapping component receives polarization experiment parameters input from the teacher via an external communication interface. These parameters include the polarizer rotation angle range, incident light intensity reference value, initial polarization state type, and the spacing parameters between the polarizer and analyzer. The parameter mapping component maps the polarizer rotation angle and polarization state to visual control nodes. Each visual control node corresponds to a unique combination of polarization parameters. The component assigns a unique node identifier to each visual control node, which remains unique throughout the entire lifecycle of the node topology graph. The component constructs a node topology graph containing the visual control nodes in memory. This graph is stored using an adjacency list structure. Each head node of the adjacency list corresponds to a visual control node. The pointer field of the head node points to adjacent node entries connected to that visual control node. Each adjacent node entry stores the node identifier of the adjacent node, the weight value of the connecting edge, and the direction attribute of the connecting edge.
[0021] Furthermore, the interactive recognition component captures the teacher's gesture trajectory on the 3D polarized screen through the touch detection module. The touch detection module outputs continuous touch point data at a preset sampling frequency. Each touch point data includes the horizontal coordinate value, vertical coordinate value, touch pressure value, and sampling timestamp in the screen pixel coordinate system. The interactive recognition component performs coordinate transformation processing on the touch point data, converting the two-dimensional coordinates in the screen pixel coordinate system into spatial coordinates in the three-dimensional world coordinate system. The transformation process is completed through a viewport transformation matrix, and the transformation formula is as follows: in, These are the spatial coordinate values in a three-dimensional world coordinate system. These are the horizontal and vertical coordinate values in the screen pixel coordinate system. The depth coordinates are obtained by mapping the touch pressure value. A pre-configured viewport transformation matrix is generated based on the physical dimensions of the 3D polarized screen, the view frustum parameters, and the offset of the screen coordinate system origin. The interaction recognition component converts the spatial coordinates of the gesture trajectory into polarization parameter change events. These polarization parameter change events are stored in a structured data format, including an event type identifier, a source polarization parameter set, a target polarization parameter set, an event generation timestamp, and a verification field.
[0022] Furthermore, the event-driven engine reads polarization parameter change events from the event queue, parses the source node and target node corresponding to the polarization parameter change event, where the source node is a visual control node matching the source polarization parameter set in the event, and the target node is a visual control node matching the target polarization parameter set in the event. The event-driven engine performs path retrieval in the node topology graph to obtain a node sequence from the source node to the target node. The node sequence includes the source node, at least one intermediate node, and the target node, and adjacent nodes in the node sequence have corresponding connecting edges in the node topology graph. The event-driven engine generates intermediate code based on the weight values of the node sequence and the corresponding connecting edges. The intermediate code is stored in an intermediate code cache queue in memory and includes an instruction header, a node sequence segment, a weight parameter segment, and a verification segment. Specifically, the instruction header of the intermediate code includes a 4-byte instruction length field, a 2-byte execution priority field, an 8-byte generation timestamp field, a 2-byte instruction type field, and a 2-byte checksum field; the node sequence segment uses a variable-length storage format, including a 2-byte node count field followed by consecutive node identifier fields, each node identifier field being 4 bytes long; the weight parameter segment includes a weight value field corresponding to the number of nodes, each weight value field being 4 bytes long, stored in single-precision floating-point format; and the checksum segment includes a 4-byte cyclic redundancy check code, used for integrity verification of the intermediate code.
[0023] Furthermore, the intermediate code interpreter reads intermediate code from the intermediate code cache queue and translates it into low-level hardware control instructions. The intermediate code interpreter parses the node sequence segment and weight parameter segment of the intermediate code, extracts the polarization parameter corresponding to each node in the node sequence, and, based on a pre-configured parameter-voltage mapping relationship, converts the polarization parameter into the driving voltage values corresponding to the left-eye polarizing filter and the right-eye polarizing filter, and converts the weight values of the connection edges into step values for voltage adjustment. The low-level hardware control instructions generated by the intermediate code interpreter include a voltage control instruction set and a rendering synchronization instruction set. The voltage control instruction set is sent to the polarizing filter driving circuit of the 3D polarized screen via the peripheral bus to drive the voltage value adjustment of the left-eye and right-eye polarizing filters; the rendering synchronization instruction set is sent to the rendering engine of the graphics rendering unit to synchronously drive the rendering engine to update the binocular parallax calculation parameters. The data frame of the underlying hardware control instruction contains a 1-byte frame start marker, a 1-byte instruction type marker, a 2-byte instruction length field, an 8-byte timing marker field, a 4-byte left eye drive voltage field, a 4-byte right eye drive voltage field, a 2-byte rendering synchronization marker field, and a 1-byte frame end marker. The left eye drive voltage field and the right eye drive voltage field are stored in 16-bit fixed-point number format, and their value range matches the working voltage range of the polarization filter.
[0024] Specifically, the rendering engine receives the rendering synchronization instruction set from the underlying hardware control instructions, extracts the driving voltage values corresponding to the left-eye polarizing filter and the right-eye polarizing filter, calculates the difference between the two driving voltage values, and inputs the difference into a preset disparity calculation function to obtain the binocular disparity parameters. Based on the binocular disparity parameters, the rendering engine updates the position parameters of the left-eye and right-eye cameras, generates corresponding left-eye and right-eye camera offset matrices, and overwrites these offset matrices into the rendering pipeline parameter stack of the current 3D scene. In subsequent frame rendering processes, the rendering pipeline completes the rendering and output of the binocular images based on the updated parameter stack.
[0025] Table 1. Attribute Field Definitions for Visual Control Nodes Node identifier Unsigned integer 4 bytes A unique identifier for the visual control node, used for node location and path retrieval in the node topology graph. Polarizer rotation angle value Single-precision floating point 4 bytes The reference value of the polarizer rotation angle corresponding to the node provides reference data for parameter mapping and voltage conversion. Polarization state type Enumeration type 1 byte The polarization state types corresponding to the nodes include linear polarization, circular polarization, and elliptic polarization. Screen space coordinates floating-point array 12 bytes The three-dimensional display coordinates of the node on the 3D polarized screen provide a coordinate reference for gesture trajectory matching. Node status flags Location field 1 byte The availability status of the identifier node includes three states: normal, disabled, and pending update. Reserved fields byte array 8 bytes Additional attribute parameters for storage nodes used for subsequent feature expansion. In this embodiment, Table 1 defines the structured storage format of the visual control nodes. All visual control nodes are stored according to the field format defined in this table, ensuring that the parameters of each node in the node topology graph can be quickly read and parsed by the event-driven engine and parameter mapping component. The node identifier field is assigned when the node is generated and remains unique throughout the entire lifecycle of the node topology graph, avoiding node positioning conflicts. The polarizer rotation angle value and polarization state type fields are the core attributes of the node, directly determining the polarization optical parameters corresponding to the node. The screen space coordinate field is bound to the viewport parameters of the 3D polarized screen, ensuring that the display position of the node on the screen is consistent with the coordinate system of touch detection. The node status marker field can be updated in real time to mark the validity of the node, providing a status basis for the dynamic update of the topology graph. The reserved fields can be expanded to store additional parameters of the node according to actual application needs, such as the node's display style, operation permissions, etc.
[0026] In this embodiment, a node topology graph containing visual control nodes is constructed through a parameter mapping component, the spatial coordinates of gesture trajectories are converted into polarization parameter change events through an interaction recognition component, path retrieval is completed and intermediate code is generated through an event-driven engine, and the intermediate code is translated into underlying hardware control instructions through an intermediate code interpreter. This realizes the end-to-end processing from human-computer interaction actions to polarization hardware control and rendering parameter updates, and transforms continuous human-computer interaction actions into real-time calculation of node paths, replacing the linear response mode of static mapping scripts in the prior art.
[0027] In a preferred embodiment, reference Figure 2When constructing the node topology graph, the parameter mapping component divides the polarizer rotation angle range into multiple discrete angle intervals, each corresponding to a visual control node. Specifically, the parameter mapping component reads the polarizer rotation angle range input from the teacher's end. The minimum value of the rotation angle range is 0°, and the maximum value is 180°. The parameter mapping component divides the rotation angle range into continuous discrete angle intervals according to a preset angle interval. Each discrete angle interval has the same angle span, and the center angle value of the interval is the reference value of the polarizer rotation angle corresponding to that interval. The parameter mapping component generates a corresponding visual control node for each discrete angle interval and writes the center angle value of the interval into the polarizer rotation angle value field of the visual control node.
[0028] Furthermore, the parameter mapping component calculates the change in light intensity transmittance between adjacent discrete angle intervals based on Malus's law in polarization optics. The formula for Malus's law is as follows: in, This represents the intensity of the transmitted light after passing through the polarizer. The reference value for the incident light intensity incident on the polarizer. This is the angle between the polarization axes of the polarizer and the analyzer. For each pair of adjacent discrete angle intervals, the parameter mapping component calculates the transmitted light intensity value corresponding to the center angle of the previous interval and the transmitted light intensity value corresponding to the center angle of the next interval, respectively. The absolute value of the difference between the two transmitted light intensity values is calculated as the change in light intensity transmittance between the two adjacent discrete angle intervals. The parameter mapping component has a preset change threshold, which is set as a percentage of the incident light intensity reference value. When the calculated change in light intensity transmittance is greater than the preset change threshold, a directed connection edge is established between the corresponding two adjacent visualization control nodes. The direction of the directed connection edge is from the node corresponding to the previous interval to the node corresponding to the next interval. The parameter mapping component uses the change in light intensity transmittance as the weight value of the directed connection edge and stores it in the corresponding entry in the adjacency table of the node topology graph.
[0029] Table 2. Mapping Relationship between Discrete Angle Ranges and Visual Control Nodes 1 0°-2° 1° NODE001 0.9997 2 2°-4° 3° NODE002 0.9973 3 4°-6° 5° NODE003 0.9924 4 6°-8° 7° NODE004 0.9851 5 8°-10° 9° NODE005 0.9755 6 10°-12° 11° NODE006 0.9635 7 12°-14° 13° NODE007 0.9493 8 14°-16° 15° NODE008 0.9330 9 16°-18° 17° NODE009 0.9145 10 18°-20° 19° NODE010 0.8939 In this embodiment, Table 2 defines a one-to-one mapping relationship between discrete angle intervals and visual control nodes. The parameter mapping component uses this table to divide the angle intervals and generate nodes, ensuring that the polarization parameters corresponding to each discrete angle interval can be quickly located and retrieved. The interval number is a unique sequential code for the discrete angle interval, used for sorting and traversing the intervals; the angle interval range field defines the upper and lower limits of the interval's angle, providing an interval benchmark for matching the angle increment corresponding to the gesture trajectory; the center angle value is the benchmark value of the polarizer rotation angle corresponding to the interval, providing input parameters for calculating the light intensity transmittance; the corresponding node identifier is the unique identification code of the visual control node associated with the interval, realizing the binding between the interval and the node; the initial light intensity transmittance value is the ratio of the benchmark transmitted light intensity to the incident light intensity corresponding to the center angle of the interval, providing benchmark data for calculating the weight of the connecting edge. Based on this table, the parameter mapping component can quickly calculate the change in light intensity transmittance between adjacent intervals without repeatedly traversing the angle range data, improving the efficiency of building the node topology graph.
[0030] Furthermore, during the path retrieval process executed by the event-driven engine, the parameter mapping component monitors the changes in light intensity transmittance corresponding to each directed connection edge in the node topology graph in real time. Specifically, according to a preset monitoring cycle, the parameter mapping component reads the polarizer rotation angle values of the two nodes corresponding to all directed connections in the adjacency table of the node topology graph, and recalculates the change in light intensity transmittance corresponding to each directed connection edge based on the current incident light intensity reference value. The parameter mapping component compares the recalculated change in light intensity transmittance with a preset change threshold. When it detects that the change in light intensity transmittance of a certain directed connection edge is lower than the preset change threshold, the parameter mapping component deletes the entry record corresponding to that directed connection edge in the adjacency table and sends a topology update interruption signal to the event-driven engine. After receiving the topology update interruption signal, the event-driven engine interrupts the currently executing path retrieval task, reads the updated adjacency table data, recalculates the cumulative sum of path weights from the source node to the target node, generates an updated target path, generates new intermediate code based on the updated target path, and writes it to the intermediate code cache queue.
[0031] In this embodiment, the parameter mapping component completes the batch generation of visual control nodes by dividing discrete angle intervals. Based on Malus's law, it calculates the change in light intensity transmittance between adjacent nodes and establishes weighted directed connection edges, thereby realizing the construction of a node topology graph that conforms to the physical laws of polarization optics. By monitoring the change in light intensity transmittance of the connection edges in real time, the adjacency list structure of the node topology graph is dynamically updated, and the event-driven engine is triggered to re-execute the path retrieval, ensuring that the path retrieval results always match the current polarization optics parameters, thus avoiding the problem of path retrieval results not conforming to physical laws caused by static topology structures.
[0032] In a preferred embodiment, reference Figure 3 When the interaction recognition component converts the spatial coordinates of a gesture trajectory into a polarization parameter change event, it establishes a three-dimensional polar coordinate system on the 3D polarized screen with the initial touch point as the origin. Specifically, when the interaction recognition component captures the initial touch point of the gesture trajectory, it sets the spatial coordinates of the initial touch point in the three-dimensional world coordinate system as the origin of the three-dimensional polar coordinate system. The horizontal rightward direction of the 3D polarized screen is taken as the radial direction of the polar axis, the direction perpendicular to the 3D polarized screen outward is taken as the axial direction of the polar axis, and the vertical upward direction of the screen is taken as the reference direction of the azimuth angle, thus completing the establishment of the three-dimensional polar coordinate system.
[0033] Furthermore, the interaction recognition component extracts the radial distance change sequence and azimuth change sequence of the gesture trajectory in a three-dimensional polar coordinate system according to a preset time sampling interval. The preset time sampling interval is consistent with the sampling period of the touch detection module. For each sampling moment, the interaction recognition component converts the spatial coordinates of the gesture trajectory acquired into polar coordinate parameters in a three-dimensional polar coordinate system. The conversion formula is as follows: in, This is the radial distance value. This is the azimuth value. This is the axial depth value. These are the coordinates of the sampling point in the three-dimensional world coordinate system. These are the coordinates of the origin of the three-dimensional polar coordinate system, i.e., the three-dimensional world coordinates of the initial touch point. The interaction recognition component combines the radial distance values of all sampling points into a radial distance variation sequence and the azimuth values of all sampling points into an azimuth variation sequence, according to the order of sampling time.
[0034] Furthermore, the interactive recognition component maps the radial distance change sequence to the polarizer rotation angle increment and the azimuth angle change sequence to a polarization state type switching identifier. Specifically, the interactive recognition component presets a radial distance-angle mapping coefficient. The difference in radial distance between the final sampling point and the initial sampling point in the radial distance change sequence is multiplied by this mapping coefficient to obtain the polarizer rotation angle increment. The interactive recognition component presets an azimuth angle threshold range; different azimuth angle threshold ranges correspond to different polarization state types. The interactive recognition component reads the azimuth angle value of the final sampling point in the azimuth angle change sequence, determines its corresponding azimuth angle threshold range, obtains the corresponding polarization state type, and compares the polarization state type corresponding to the final sampling point with the polarization state type corresponding to the initial touch point. If they are inconsistent, a polarization state type switching identifier is generated; if they are consistent, a no-switching identifier is generated. The interactive recognition component encapsulates the polarizer rotation angle increment and the polarization state type switching identifier as attribute fields of a polarization parameter change event and writes them into the structured data of the polarization parameter change event.
[0035] Table 3. Mapping relationship between polar coordinate parameters and polarization parameters of gesture trajectory sampling points. T0 0.00 0.000 0.00 0.00 0-π / 2 linear polarization none T1 2.35 0.125 2.35 2.82 0-π / 2 linear polarization none T2 4.71 0.248 4.71 5.65 0-π / 2 linear polarization none T3 7.06 0.374 7.06 8.47 0-π / 2 linear polarization none T4 9.42 1.782 9.42 11.30 π / 2-π Circular polarization have T5 11.77 1.905 11.77 14.12 π / 2-π Circular polarization none T6 14.13 2.031 14.13 16.96 π / 2-π Circular polarization none T7 16.48 2.154 16.48 19.78 π / 2-π Circular polarization none In this embodiment, Table 3 defines the mapping relationship between the polar coordinate parameters and polarization parameters of the gesture trajectory sampling points. The interactive recognition component uses this table to parse the sampling point data and generate polarization parameter change events, ensuring that spatial changes in the gesture trajectory can be accurately mapped to changes in polarization experimental parameters. The sampling time is the timestamp corresponding to the sampling point, used for sequence sorting and time synchronization; the radial distance value and azimuth angle value are parameters of the sampling point in the three-dimensional polar coordinate system, providing input data for the polarization parameter mapping; the radial distance difference is the difference between the radial distances of the current sampling point and the initial sampling point, used to calculate the polarizer rotation angle increment; the polarizer rotation angle increment is the polarization parameter change value obtained by mapping the radial distance difference; the azimuth angle interval is the threshold interval corresponding to the azimuth angle value of the current sampling point, used to match the corresponding polarization state type; the polarization state type is the polarization state parameter corresponding to the current sampling point; the switching identifier is used to mark whether the polarization state of the current sampling point has changed compared to the initial sampling point, providing an identifier for the generation of polarization parameter change events. Based on this table, the interactive recognition component can quickly complete the parameter parsing of the gesture trajectory without repeatedly performing coordinate transformation and mapping calculations, improving the generation efficiency of polarization parameter change events.
[0036] Furthermore, when extracting the radial distance variation sequence and azimuth variation sequence, the interaction recognition component establishes a sliding window containing multiple consecutive time sampling intervals. Preferably, the length of the sliding window is set to 5 consecutive sampling points, corresponding to 5 sampling cycles of the touch detection module. The sliding window slides along the radial distance variation sequence and azimuth variation sequence according to the time sampling intervals, with each slide step being 1 sampling point. The interaction recognition component calculates the radial distance variance and azimuth variance of all sampling points within the sliding window. The variance calculation formula is as follows: in, This represents the variance of the radial distance within the sliding window. This represents the variance of the azimuth angle within the sliding window. This represents the number of sampling points within the sliding window. For the first in the window The radial distance value of each sampling point, This represents the average radial distance of all sampling points within the window. For the first in the window Azimuth angle values of each sampling point This is the average azimuth angle of all sampling points within the window.
[0037] The interactive recognition component has a preset variance threshold. When the radial distance variance or azimuth variance within the sliding window exceeds the preset variance threshold, all sampling points within the sliding window are determined to be noise points and are removed. The interactive recognition component performs linear interpolation to complete the radial distance change sequence after removing noise points. The interpolation calculation formula is as follows: in, For the first Interpolated radial distance values for each missing location, This represents the radial distance value of the previous valid sampling point at the missing location. For the missing position, the first The radial distance value of each valid sampling point. This represents the number of missing sampling points. The relative time coefficient corresponding to the interpolation position ranges from 0 to 1. The interactive recognition component uses the same interpolation method to complete the azimuth change sequence, generates the polarizer rotation angle increment based on the completed radial distance change sequence, and generates a polarization state type switching identifier based on the completed azimuth change sequence.
[0038] In this embodiment, the interactive recognition component establishes a three-dimensional polar coordinate system to convert the spatial coordinates of the gesture trajectory into a sequence of radial distance and azimuth angle, thereby achieving a precise mapping of the spatial changes of the gesture trajectory to polarization parameters. By calculating the variance of the sampling points through a sliding window, noise points are identified and eliminated. Furthermore, missing data in the sequence is supplemented through linear interpolation, reducing the interference of touch noise on the calculation of polarization parameters and improving the accuracy of polarization parameter change events.
[0039] In a preferred embodiment, reference Figure 4 When performing path retrieval in the node topology graph, the event-driven engine parses polarization parameter change events to obtain the starting and ending angles. It then locates the source node matching the starting angle and the target node matching the ending angle in the node topology graph. Specifically, the event-driven engine parses the attribute fields of the polarization parameter change event, extracts the polarizer rotation angle increment and the initial polarizer rotation angle value, and calculates the starting and ending angles. The starting angle is the initial polarizer rotation angle value, and the ending angle is the sum of the initial polarizer rotation angle value and the polarizer rotation angle increment. The event-driven engine traverses all visual control nodes in the node topology graph, reads the polarizer rotation angle value of each node, calculates the absolute value of the difference between the value and the starting and ending angles, and selects the node with the smallest absolute difference as the source and target nodes, respectively.
[0040] Furthermore, the event-driven engine reads the adjacency list of the node topology graph, calculates the sum of path weights from the source node through each intermediate node to the target node, and selects the node sequence with the smallest sum of path weights as the target path. The formula for calculating the sum of path weights is as follows: in, This is the sum of path weights. This represents the number of connecting edges in the path. For the first in the path The node to the first The event-driven engine uses Dijkstra's algorithm to calculate the cumulative sum of path weights and retrieve the shortest path. When executing Dijkstra's algorithm, it first initializes the distance array and the predecessor node array. The distance value corresponding to the source node in the distance array is 0, and the distance values corresponding to other nodes are infinity. Then, it traverses all nodes in the node topology graph, selecting the node with the smallest distance value in the distance array that has not been visited, marking it as visited, and updating the distance values of all its neighboring nodes. If the distance value to a neighboring node through the current node is less than the current distance value of the neighboring node, then the distance values of the neighboring nodes and the predecessor node array are updated. When the target node is marked as visited, the algorithm terminates, and the target path from the source node to the target node is obtained by backtracking through the predecessor node array. The event-driven engine writes the node identifiers and edge weights contained in the retrieved target path into the instruction segment of the intermediate code in the ordered sequence.
[0041] Furthermore, when calculating the cumulative sum of path weights, the event-driven engine extracts the polarization state type corresponding to the current node and the next hop node for each hop transition in the node topology graph. The event-driven engine queries a pre-defined polarization state switching penalty table to obtain the penalty coefficient corresponding to switching from the current polarization state type to the next hop polarization state type. This penalty coefficient is then multiplied by the weight of the connection edge between the current node and the next hop node. The product is used as the updated connection edge weight in subsequent calculations of the cumulative sum of path weights. The update formula for the connection edge weight is as follows: in, The updated edge weights, To determine the polarization state type of the current node Switch to next-hop node polarization state type The corresponding penalty coefficient, These are the original weight values of the connecting edges.
[0042] Table 4. Penalty Coefficients for Polarization State Switching linear polarization linear polarization 1.0 linear polarization Circular polarization 2.5 linear polarization Elliptic polarization 1.8 Circular polarization linear polarization 2.5 Circular polarization Circular polarization 1.0 Circular polarization Elliptic polarization 1.2 Elliptic polarization linear polarization 1.8 Elliptic polarization Circular polarization 1.2 Elliptic polarization Elliptic polarization 1.0 In this embodiment, Table 4 defines the penalty coefficients corresponding to switching between different polarization state types. The event-driven engine updates the connection edge weights based on this table, ensuring that the path retrieval results prioritize paths with fewer polarization state switching times and smaller switching amplitudes, conforming to the operational logic of polarization experiments. The source polarization state type is the polarization state type corresponding to the starting node of the node transfer, and the target polarization state type is the polarization state type corresponding to the ending node of the node transfer. The penalty coefficient value is the weight amplification coefficient corresponding to the polarization state switching. The larger the penalty coefficient value, the less advantageous the corresponding node transfer path is in weight accumulation and calculation, thereby reducing the probability that the path is selected as the target path. In the polarization state switching penalty table, the penalty coefficient corresponding to switching between linear polarization state and circular polarization state is greater than the penalty coefficient corresponding to switching between polarization states of the same type. This can effectively avoid frequent cross-type polarization state switching in the path retrieval results, ensuring that the change process of polarization parameters conforms to the physical laws of polarization optics and the operational habits of teaching experiments.
[0043] Further, refer to Figure 5 When translating low-level hardware control instructions, the intermediate code interpreter parses the instruction segments of the intermediate code to obtain the node identifiers and connection weights contained in the target path. Based on a preset voltage mapping lookup table, the intermediate code interpreter converts the node identifiers into the basic driving voltage values of the left-eye polarizing filter and the right-eye polarizing filter, and converts the connection weights into voltage adjustment step sizes. The voltage mapping lookup table stores the corresponding relationships between node identifiers and basic driving voltage values. The range of basic driving voltage values matches the operating voltage range of the polarizing filters, and the voltage adjustment step size is linearly positively correlated with the connection weights. The intermediate code interpreter accumulates the basic driving voltage values and voltage adjustment step sizes according to the order of the target path to generate the final driving voltage value corresponding to each node. The calculation formula is as follows: in, For the first in the target path The final driving voltage value of the left eye polarizing filter corresponding to each node. For the first in the target path The final driving voltage value of the right eye polarizing filter corresponding to each node. For the first The basic driving voltage value of the left eye corresponding to each node. For the first The basic driving voltage value of the right eye corresponding to each node. This represents the voltage adjustment step size corresponding to a unit weight. For the first in the target path The node to the first The connection edge weights of each node. Based on the calculated final drive voltage values, the intermediate code interpreter generates low-level hardware control instructions containing timing markers.
[0044] Furthermore, when generating low-level hardware control instructions containing timing markers, the intermediate code interpreter obtains the vertical synchronization signal output by the display driver board of the 3D polarized screen. The intermediate code interpreter uses the rising edge of the vertical synchronization signal as a time base to calculate the transmission time offset of the low-level hardware control instructions corresponding to each node in the target path. The calculation formula is as follows: in, For the first The time offset of sending the underlying hardware control commands for each node. This refers to the duration of the display blanking period corresponding to the vertical synchronization signal. The target path contains the number of connected edges, i.e., the number of nodes, minus 1. The display blanking period of the vertical synchronization signal is the time interval between the completion of scanning one frame of the 3D polarization screen and the start of scanning the next frame. The intermediate code interpreter will attach the sending time offset to the data frame header of the corresponding underlying hardware control command, controlling the underlying hardware control command to be output to the driving electrodes of the left and right eye polarization filters within the display blanking period of the vertical synchronization signal.
[0045] Further, refer to Figure 6 When the rendering engine updates the binocular disparity calculation parameters synchronously, the underlying hardware control instructions include left-eye voltage parameters and right-eye voltage parameters. The left-eye voltage parameter is the final driving voltage value of the left-eye polarizing filter, and the right-eye voltage parameter is the final driving voltage value of the right-eye polarizing filter. The rendering engine receives the underlying hardware control instructions, extracts the voltage difference between the left-eye and right-eye voltage parameters, and inputs the voltage difference into a preset disparity calculation function. The formula for the disparity calculation function is as follows:
[0046] in, For binocular parallax parameters, For the pre-configured parallax conversion coefficients, For left eye voltage parameters, The voltage parameter is for the right eye. The disparity calculation function uses the voltage difference as the independent variable to calculate the offset matrices of the left and right eyes. The matrix generation formula is as follows: in, This is the offset matrix for the left eye camera. This is the offset matrix for the right eye camera. These are the binocular parallax parameters. The rendering engine overwrites the left-eye camera offset matrix and the right-eye camera offset matrix into the rendering pipeline parameter stack of the current 3D scene. During subsequent frame rendering, the rendering pipeline adjusts the parallax of the left and right eye images and renders the output based on the offset matrices in the parameter stack.
[0047] In this embodiment, the event-driven engine uses the Dijkstra algorithm to find the shortest path and introduces a polarization state switching penalty coefficient to optimize the calculation of connection edge weights, ensuring that the path retrieval results conform to the physical laws and operational logic of polarization experiments. The intermediate code interpreter uses a voltage mapping lookup table to convert polarization parameters to driving voltages and calculates the instruction sending time offset based on the display blanking period of the vertical synchronization signal, thus synchronizing the polarization hardware driving timing with the rendering pipeline's image updates. The rendering engine calculates the binocular parallax parameters and updates the camera offset matrix based on the voltage difference between the left and right eyes, achieving synchronous linkage between polarization hardware control and 3D image rendering, avoiding image tearing.
Claims
1. A control system for a 3D polarization teaching all-in-one machine based on human-computer interaction, characterized in that, This includes a parameter mapping component, an interaction recognition component, an event-driven engine, and an intermediate code interpreter; The parameter mapping component receives polarization experiment parameters input by the teacher, maps the polarizer rotation angle and polarization state to visual control nodes, and constructs a node topology graph containing the visual control nodes in memory. The interactive recognition component captures the teacher's gesture trajectory on the 3D polarized screen and converts the spatial coordinates of the gesture trajectory into polarization parameter change events. The event-driven engine extracts the source node and target node corresponding to the polarization parameter change event, performs path retrieval in the node topology graph, and generates intermediate code. The intermediate code interpreter translates the intermediate code into low-level hardware control instructions, which are used to drive the voltage adjustment of the left-eye polarizing filter and the right-eye polarizing filter of the 3D polarizing screen, and to synchronously drive the rendering engine to update the binocular parallax calculation parameters.
2. The control system for the 3D polarization teaching all-in-one machine based on human-computer interaction according to claim 1, characterized in that, When constructing the node topology graph, the parameter mapping component divides the polarizer rotation angle range into multiple discrete angle intervals, and each discrete angle interval corresponds to a visualization control node. The parameter mapping component calculates the change in light intensity transmittance between adjacent discrete angle intervals based on Malus's law in polarization optics. When the change in light intensity transmittance is greater than a preset threshold, a directed connection edge is established between the corresponding two adjacent visualization control nodes, and the change in light intensity transmittance is stored as the weight value of the directed connection edge in the adjacency table of the node topology graph.
3. The human-computer interaction-based 3D polarization teaching all-in-one machine control system according to claim 1, characterized in that, When the interaction recognition component converts the spatial coordinates of the gesture trajectory into the polarization parameter change event, it establishes a three-dimensional polar coordinate system with the initial touch point as the origin on the 3D polarization screen. The interactive recognition component extracts the radial distance change sequence and azimuth angle change sequence of the gesture trajectory in the three-dimensional polar coordinate system according to a preset time sampling interval; The interactive recognition component maps the radial distance change sequence to a polarizer rotation angle increment, maps the azimuth angle change sequence to a polarization state type switching identifier, and encapsulates the polarizer rotation angle increment and the polarization state type switching identifier into attribute fields of the polarization parameter change event.
4. The human-computer interaction-based 3D polarization teaching all-in-one machine control system according to claim 1, characterized in that, When the event-driven engine performs path retrieval in the node topology graph, it parses the polarization parameter change event to obtain the starting angle and the ending angle, and locates the source node that matches the starting angle and the target node that matches the ending angle in the node topology graph. The event-driven engine reads the adjacency list of the node topology graph, calculates the sum of path weights from the source node through each intermediate node to the target node, selects the node sequence with the smallest sum of path weights as the target path, and writes the node identifiers and connecting edge weights contained in the target path into the instruction segment of the intermediate code in the order of arrangement.
5. The human-computer interaction-based 3D polarization teaching all-in-one machine control system according to claim 1, characterized in that, When translating the underlying hardware control instructions, the intermediate code interpreter parses the instruction segments of the intermediate code to obtain the node identifiers and connection edge weights contained in the target path. The intermediate code interpreter converts the node identifier into the basic driving voltage value of the left eye polarization filter and the basic driving voltage value of the right eye polarization filter according to the preset voltage mapping lookup table, and converts the connection edge weight into the voltage adjustment step size. The intermediate code interpreter calculates the basic drive voltage value and the voltage adjustment step size by accumulating them according to the order of the target path, and generates the underlying hardware control instructions containing timing marks.
6. The human-computer interaction-based 3D polarization teaching all-in-one machine control system according to claim 1, characterized in that, When synchronously driving the rendering engine to update the binocular parallax calculation parameters, the underlying hardware control instructions include left eye voltage parameters and right eye voltage parameters; The rendering engine receives the underlying hardware control instructions and extracts the voltage difference between the left eye voltage parameter and the right eye voltage parameter; The rendering engine inputs the voltage difference into a preset disparity calculation function, which uses the voltage difference as the independent variable to calculate the left-eye camera offset matrix and the right-eye camera offset matrix. The rendering engine overwrites the left-eye camera offset matrix and the right-eye camera offset matrix into the rendering pipeline parameter stack of the current 3D scene.
7. The control system for the 3D polarization teaching all-in-one machine based on human-computer interaction according to claim 2, characterized in that, The parameter mapping component monitors the change in light intensity transmittance corresponding to each directed connection edge in the node topology graph in real time during the path retrieval process executed by the event-driven engine. When the change in light intensity transmittance of a directed connection edge is detected to be lower than the preset change threshold, the parameter mapping component deletes the record of the directed connection edge in the adjacency list and triggers the event-driven engine to interrupt the currently executing path retrieval task. Based on the updated adjacency list, the cumulative sum of path weights from the source node to the target node is recalculated to generate the updated target path.
8. The human-computer interaction-based 3D polarization teaching all-in-one machine control system according to claim 3, characterized in that, When the interactive recognition component extracts the radial distance change sequence and the azimuth change sequence, it establishes a sliding window containing multiple consecutive time sampling intervals; The interactive recognition component calculates the radial distance variance and azimuth variance of all sampling points within the sliding window. When the radial distance variance or the azimuth variance exceeds a preset variance threshold, the sampling point within the sliding window is determined to be a noise point and is removed. The interactive recognition component performs linear interpolation to complete the radial distance change sequence after removing the noise points, and generates the polarizer rotation angle increment based on the completed sequence.
9. The control system for the 3D polarization teaching all-in-one machine based on human-computer interaction according to claim 4, characterized in that, When calculating the cumulative sum of path weights, the event-driven engine extracts the polarization state type corresponding to the current node and the next hop node for each hop node transition in the node topology graph. The event-driven engine queries a preset polarization state switching penalty table to obtain the penalty coefficient corresponding to switching from the current polarization state type to the next hop polarization state type. The penalty coefficient is multiplied by the weight of the connection edge between the current node and the next hop node. The product is used as the updated connection edge weight to participate in the subsequent path weight accumulation calculation. The penalty coefficient corresponding to switching between linear polarization state and circular polarization state in the polarization state switching penalty table is greater than the penalty coefficient corresponding to switching between polarization states of the same type.
10. The human-computer interaction-based 3D polarization teaching all-in-one machine control system according to claim 5, characterized in that, When the intermediate code interpreter generates the underlying hardware control instructions containing timing marks, it obtains the vertical synchronization signal output by the display driver board of the 3D polarized screen. The intermediate code interpreter uses the rising edge of the vertical synchronization signal as a time base to calculate the transmission time offset of the underlying hardware control instructions corresponding to each node in the target path. The intermediate code interpreter appends the transmission time offset to the data frame header of the corresponding underlying hardware control instruction, and controls the underlying hardware control instruction to be output to the driving electrodes of the left-eye polarizing filter and the right-eye polarizing filter during the display blanking period of the vertical synchronization signal.