A method for simulating the process of viewing angle and distance transformation for simulation experiments
By obtaining mouse position information in simulation experiments and controlling viewing motion using interpolation algorithm and Bezier curve formula, the problem of inadequate viewing motion is solved, and more natural and flexible viewing operation is achieved, reducing motion sickness effect.
Patent Information
- Application Number
- CN202411450257.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-10-17
AI Technical Summary
In the prior art, the motion mode of view angle is not soft enough, and the motor behavior triggers are sensitive and cannot be stopped, resulting in frequent visual field changes and motion sickness effects.
By obtaining mouse position information, determining the working mode, using the interpolation algorithm to control the viewing angle movement, using the second-order Bezier curve formula for interpolation movement, calculating the position of the visual target in the next frame and performing collision detection, allowing gradual acceleration and deceleration of the viewing angle movement, And stop moving when encountering obstacles.
Optimize the viewpoint movement method, reduce the effect of motion sickness, improve the freedom and accuracy of viewpoint operation, and enhance the use feeling.
Smart Images

Figure CN118963571B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of view angle transformation simulation, and relates to a view angle and view distance transformation process simulation technology, and specifically to a view angle and view distance transformation process simulation method for simulation experiments. Background Art
[0002] Perspective transformation refers to the user or system automatically changing the position and direction of the observation point to obtain views from different angles; through the transformation of the perspective and distance, the user can observe the details and overall situation of the experimental object more intuitively, reducing unnecessary operation steps and time waste. This intuitiveness allows users to understand the experimental phenomena and results more quickly, thereby improving the efficiency of the experiment; the simulation of the perspective and distance transformation process allows users to accurately control the angle and distance of observation, so that they can observe and analyze the experimental phenomena more accurately. This precise controllability helps users discover subtle changes and problems in the experiment, improving the accuracy and reliability of the experiment; the perspective and distance transformation process simulation also helps users discover and solve potential safety hazards. In a virtual environment, users can simulate various possible operation scenarios and accident situations, evaluate the safety and feasibility of the experiment through observation and analysis, and avoid similar accidents in actual operations. The perspective and distance transformation process simulation is highly flexible, and users can flexibly adjust the angle and distance of observation according to their needs and experimental purposes. This flexibility enables simulation experiments to adapt to various complex experimental scenarios and needs.
[0003] The prior art (invention patent with application number 2022116777081) discloses a smart perspective switching method for virtual simulation experiments, which includes: step one: enter the virtual simulation experiment, obtain the global perspective of the experiment, and the user observes the overall scene of the experiment through the global perspective; step two: identify the position of the mouse in the global perspective in real time, automatically locate it to the corresponding first local area according to the mouse position, and adjust the optimal viewing distance of the first local area; step three: when the user clicks the area where the component is located with the mouse in the first local area, the operation visual distance to the component is automatically adjusted; step four: in the component perspective, identify the mouse position in real time, mark the second local area according to the mouse position, and adjust the optimal operation perspective and distance to enter the second local area; step five: when the user clicks the lock button in the component perspective, the component perspective becomes locked, and the user adjusts the component in the second local area in the locked state; the prior art simulates the visual interaction behavior of the human eye through the mouse, which improves the degree of freedom, but there are still some problems:
[0004] (1) The movement of the perspective is not smooth enough. The movement with a straight line as the movement curve is jerky and rigid in the perspective switching behavior, which fails to reflect the continuity of the human eye's focusing behavior;
[0005] (2) The movement of the view is sensitive to triggering and cannot be interrupted. The movement of the view is too sensitive to triggering, which can easily trigger misoperation. The view moves in an absolute path and cannot be interrupted. In actual use by users, redundant operations are added, resulting in frequent changes in the field of view and causing motion sickness.
[0006] The present invention provides a method for simulating the process of visual angle and viewing distance transformation for simulation experiments to solve the above technical problems. Summary of the invention
[0007] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes a method for simulating the perspective view distance transformation process for simulation experiments, which is used to solve the technical problems in the prior art that the perspective movement mode is not soft enough and the movement behavior triggering is sensitive and cannot be stopped.
[0008] To achieve the above object, a first aspect of the present invention provides a method for simulating a viewing angle and a viewing distance transformation process for a simulation experiment, comprising:
[0009] Step S1: obtaining the position information of the mouse, and determining the working mode according to the position information; wherein the working mode includes a viewing angle and sight distance change simulation mode and an instrument operation mode;
[0010] Step S2: in the view angle and distance change simulation mode, obtain the movement signal of the mouse; determine whether the mouse is in the visual change simulation area according to the movement signal; if yes, identify the overlapping part in the visual change simulation area; if no, calculate the visual target position of the next frame and identify the collision blockage;
[0011] Step S3: In the instrument operation mode, the coordinate information of the mouse is obtained, and rays are emitted to the three-dimensional position pointed to by the mouse in the screen space to determine whether the rays hit the optimal viewing area of the instrument; if so, the viewing angle is controlled to move toward the optimal viewing area of the corresponding instrument; if not, the coordinate information of the mouse is continuously detected.
[0012] Preferably, determining the working mode according to the position information includes:
[0013] The position information of the mouse is retrieved, and it is determined whether the mouse is in the best viewing angle area according to the position information of the mouse; if yes, the working mode is switched to the instrument operation mode; if not, the working mode is kept as the viewing angle and sight distance change simulation mode.
[0014] It should be noted that after opening the experiment, the experiment is in the set global perspective position and is in the perspective view distance change simulation mode by default.
[0015] The present invention analyzes whether the working mode needs to be switched according to the position information of the mouse, and can adjust the control of the viewing angle according to the needs, which is beneficial to improving the viewing experience of the viewer.
[0016] Preferably, judging whether the mouse is in the viewing angle change simulation area according to the movement signal includes:
[0017] Retrieve the current spatial coordinates of the mouse (Mx, My); map the instrument coordinates in the 3D scene to the screen space to obtain the mapping coordinates of the instrument; assume that the mapping coordinates are (Ox, Oy) and the radius is R; construct a view angle and distance change simulation area on the screen as ;
[0018] Read the mouse input signal P1 in the first frame, and read the current mouse input signal P2 starting from the second frame; subtract the input signal P2 from the input signal P1 to obtain the change in the horizontal and vertical directions of the mouse ; Normalize the change to get the mouse displacement change vector ;
[0019] judge Is it less than R? If yes, it is determined that the mouse is in the viewing angle change simulation area; if no, it is determined that the mouse is not in the viewing angle change simulation area.
[0020] The present invention analyzes the movement information of the mouse, analyzes the displacement change vector of the mouse according to the movement information of the mouse, and analyzes whether the mouse is in the view angle change simulation area, so as to timely analyze the instrument that the user needs to view and switch the view angle in time.
[0021] Preferably, identifying the overlapping portion in the visual change simulation area includes:
[0022] The position information of each instrument is obtained, and whether there is overlap is determined based on the position information; if yes, the target instrument is analyzed based on the displacement change vector; if no, the current instrument is used as the target instrument.
[0023] Preferably, analyzing the target instrument according to the displacement change vector includes:
[0024] Get the center position Oi of the best viewing angle of several instruments; call the position M of the mouse; calculate the vector between the mouse position and the center position as ; Where i is the number of the instrument, i=1,2,…,n, n is a positive integer;
[0025] Calculated by vector dot multiplication and The angle θi is:
[0026] ;
[0027] Determine whether θi is less than 90 degrees; if yes, take the corresponding instrument as the target instrument, and control the viewing angle to interpolate and move toward the corresponding optimal visual position; if no, control the viewing angle to interpolate and move toward the corresponding optimal visual position in the reverse direction.
[0028] The present invention analyzes the instrument that the user wants to view according to the displacement change vector, obtains the target instrument that the user wants to view according to the angle analysis between the vectors, and controls the viewing angle to move to the corresponding optimal visual position, so as to switch the working state in time.
[0029] Preferably, the controlling the viewing angle to interpolate and move to the corresponding optimal visual position includes:
[0030] Get the initial position K1 before the view moves, the last target position K2, and the target position K3; use the second-order Bezier curve formula as the motion formula to calculate the current position K with respect to the cumulative time t:
[0031] ;
[0032] When t is 0, K(0)=K1; when t is 1, K(1)=K3; then it is determined that the viewing angle moves to the optimal visual position.
[0033] The present invention utilizes an interpolation algorithm to move the viewing angle to the optimal visual position. The interpolation movement can utilize the existing data point information and construct a mathematical model to estimate the value of the unknown data point, thereby filling in the data gaps and improving the integrity and utilization of the data.
[0034] Preferably, the calculating of the visual target position of the next frame and identifying the collision obstruction includes:
[0035] Get the current 3D space coordinates of the view , calculate the three-dimensional space coordinates of the next frame perspective ; The calculation formula is:
[0036] ;
[0037] ;
[0038] ;
[0039] in, Represents the horizontal component of vector Dir; Represents the component of vector Dir in the vertical direction;
[0040] Using collision detection algorithm to judge Is there a collision obstacle? If yes, stop the movement of the perspective; if not, use the interpolation movement algorithm to control the perspective to move to the corresponding three-dimensional space coordinates.
[0041] The present invention calculates the visual target position of the next frame and can predict the position of the next frame. When there is a collision obstacle at the position of the next frame, the movement of the viewing angle is stopped, and the movement of the viewing angle can be stopped in time to avoid collision accidents.
[0042] Preferably, the step of determining whether the ray hits the optimal viewing angle of the instrument includes:
[0043] The best viewing area of the instrument is marked as S, and the best visual position is marked as V; the coordinate position of the mouse on the near clipping plane of the viewing angle is obtained as P, and the coordinate position of the current viewing angle is obtained as Q;
[0044] Along Direction casts a ray to determine whether the ray intersects with S; if so, the interpolation movement algorithm is used to control the view to move to the optimal visual position V, and the mouse no longer controls the view movement; if not, it switches to the view distance change simulation mode and returns to the global view.
[0045] The present invention emits rays according to the position of the mouse, and when the rays intersect with the optimal viewing angle area, the viewing angle is moved to the optimal visual position, otherwise it returns to the global viewing angle; the authenticity of the viewing angle movement can be achieved, and the freedom of viewing angle operation is opened.
[0046] Preferably, returning to the global perspective includes:
[0047] Get the coordinates of the global perspective , the screen width is Width, the height is Height; the current spatial coordinates of the mouse are retrieved as ,when When , the position of the viewing angle , the interpolation movement algorithm is used to control the view to move toward K; otherwise, the movement of the view is terminated.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] 1. The present invention analyzes whether it is necessary to switch the working mode according to the position information of the mouse, and can adjust the control of the viewing angle according to the needs, which is conducive to improving the viewing experience of the viewer; analyzes the movement information of the mouse, analyzes the displacement change vector of the mouse according to the movement information of the mouse, and analyzes whether the mouse is in the viewing angle change simulation area, so as to timely analyze the instrument that the user needs to view and switch the viewing angle in time; analyzes the instrument that the user wants to view according to the displacement change vector, obtains the target instrument that the user wants to view according to the angle analysis between the vectors, and controls the viewing angle to move to the corresponding optimal visual position, so as to switch the working state in time; uses the interpolation algorithm to move the viewing angle to the optimal visual position, and the interpolation movement can use the existing data point information to estimate the value of the unknown data point by constructing a mathematical model, thereby filling the data gap and improving the integrity and utilization of the data; optimizes the movement mode of the viewing angle, uses the curve algorithm as the movement mode, and in the movement, it is manifested as a gradual acceleration behavior when the viewing angle starts to move and a gradual deceleration behavior when it is about to reach the target point, simulating the change of the viewing angle and the visual distance during the human operation experiment.
[0050] 2. The present invention can predict the position of the next frame by calculating the visual target position of the next frame. When there is a collision obstacle at the position of the next frame, the movement of the view is stopped; the movement of the view can be stopped in time to avoid collision accidents; rays are emitted according to the position of the mouse, and when the rays intersect with the optimal view area, the view is moved to the optimal visual position, otherwise it returns to the global view; the authenticity of the view movement can be achieved, and the freedom of the view operation is opened; the view movement mechanism is redesigned, and the movement path of the view is no longer limited, but a movement mechanism based on the current state and the next frame state is used. In this mechanism, the target point is allowed to be changed even during the movement. When the target point is changed, the view will recalculate the state of the next frame based on the current state and the new target point, thereby achieving the authenticity of the view movement, opening the freedom of the view operation, and reducing the occurrence of motion sickness effect from a mechanism perspective. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0052] Figure 1 It is a schematic diagram of the overall steps of the present invention;
[0053] Figure 2 Schematic diagram of the workflow of the viewing angle and sight distance change simulation mode of the present invention;
[0054] Figure 3 Schematic diagram of the workflow of the instrument operation mode of the present invention. DETAILED DESCRIPTION
[0055] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0056] See also Figure 1 The first aspect of the present invention provides a method for simulating the viewing angle and distance transformation process for a simulation experiment, comprising:
[0057] Step S1: obtaining the position information of the mouse, and determining the working mode according to the position information; wherein the working mode includes a viewing angle and sight distance change simulation mode and an instrument operation mode;
[0058] Step S2: in the view angle and distance change simulation mode, obtain the movement signal of the mouse; determine whether the mouse is in the visual change simulation area according to the movement signal; if yes, identify the overlapping part in the visual change simulation area; if no, calculate the visual target position of the next frame and identify the collision blockage;
[0059] Step S3: In the instrument operation mode, the coordinate information of the mouse is obtained, and rays are emitted to the three-dimensional position pointed to by the mouse in the screen space to determine whether the rays hit the optimal viewing area of the instrument; if so, the viewing angle is controlled to move toward the optimal viewing area of the corresponding instrument; if not, the coordinate information of the mouse is continuously detected.
[0060] See also Figure 2 , in the view distance change simulation mode, obtain the mouse movement signal; call the current spatial coordinates of the mouse (Mx, My); map the instrument coordinates in the three-dimensional scene to the screen space to obtain the mapping coordinates of the instrument; assume that the mapping coordinates are (Ox, Oy) and the radius is R; construct the view distance change simulation area on the screen as ; Read the mouse input signal P1 in the first frame, and read the current mouse input signal P2 starting from the second frame; subtract the input signal P2 from the input signal P1 to obtain the change in the horizontal and vertical directions of the mouse ; Normalize the change to get the mouse displacement change vector ;judge Is it less than R? If yes, it is determined that the mouse is in the viewing angle change simulation area; if no, it is determined that the mouse is not in the viewing angle change simulation area.
[0061] For example: suppose that the spatial coordinates of the mouse are obtained at two different times, namely the spatial coordinates of the mouse obtained at time T1 (Mx1, My1), and the spatial coordinates of the mouse obtained at time T2 (Mx2, My2); through calculation, it can be obtained that the mouse is in the perspective change simulation area at time T1; and the mouse is not in the perspective change simulation area at time T2.
[0062] Identify overlapping parts within the visual change simulation area, including:
[0063] Obtain the position information of each instrument and determine whether there is overlap based on the position information; if yes, analyze the target instrument based on the displacement change vector; if no, take the current instrument as the target instrument;
[0064] Analyze target instruments based on displacement change vectors, including:
[0065] Get the center position Oi of the best viewing angle of several instruments; call the position M of the mouse; calculate the vector between the mouse position and the center position as ; Where i is the number of the instrument, i=1,2,…,n, n is a positive integer;
[0066] Calculated by vector dot multiplication and The angle θi is:
[0067] ;
[0068] Determine whether θi is less than 90 degrees; if yes, take the corresponding instrument as the target instrument, and control the viewing angle to interpolate and move toward the corresponding optimal visual position; if no, control the viewing angle to interpolate and move toward the corresponding optimal visual position in the reverse direction.
[0069] For example: assuming that there are two overlapping parts, which are the best viewing angles of instrument 4 and instrument 7, obtain the center position of the best viewing angle and calculate the angles θ4 and θ7 respectively; if θ4 is less than 90 degrees and θ7 is greater than 90 degrees, instrument 4 is taken as the target instrument and the viewing angle is controlled to move the difference to the best visual position of instrument 4.
[0070] Control the perspective to interpolate and move to the corresponding optimal visual position, including:
[0071] Get the initial position K1 before the view moves, the last target position K2, and the target position K3; use the second-order Bezier curve formula as the motion formula to calculate the current position K with respect to the cumulative time t:
[0072] ;
[0073] When t is 0, K(0)=K1; when t is 1, K(1)=K3; then it is determined that the viewing angle moves to the optimal visual position
[0074] Calculate the visual target position of the next frame and identify collision obstacles, including:
[0075] Get the current 3D space coordinates of the view , calculate the three-dimensional space coordinates of the next frame perspective ; The calculation formula is:
[0076] ;
[0077] ;
[0078] ;
[0079] in, Represents the horizontal component of vector Dir; Represents the component of vector Dir in the vertical direction;
[0080] Using collision detection algorithm to judge Is there a collision obstacle? If yes, stop the movement of the perspective; if not, use the interpolation movement algorithm to control the perspective to move to the corresponding three-dimensional space coordinates.
[0081] For example, assuming that no overlapping area is calculated at time T3, the three-dimensional space coordinates of the next frame perspective are calculated as , the collision detection algorithm is used to determine if there is a collision obstacle in the three-dimensional space coordinates of the next frame of viewing angle, and the movement of the viewing angle is stopped.
[0082] See also Figure 3 , in the instrument operation mode, obtain the coordinate information of the mouse, and emit rays to the three-dimensional position pointed by the mouse in the screen space, mark the best viewing area of the instrument as S, and the best visual position as V; obtain the coordinate position of the mouse on the near clipping plane of the viewing angle as P, and the coordinate position of the current viewing angle as Q;
[0083] Along Directionally project a ray to determine whether the ray intersects with S; if so, use the interpolation movement algorithm to control the view to move to the optimal visual position V, and the mouse no longer controls the view movement; if not, switch to the view distance change simulation mode and return to the global view;
[0084] Get the coordinates of the global perspective , the screen width is Width, the height is Height; the current spatial coordinates of the mouse are retrieved as ,when When , the position of the viewing angle , the interpolation movement algorithm is used to control the view to move toward K; otherwise, the movement of the view is terminated.
[0085] For example: Assume that at time T4, the working mode is the instrument operation mode, obtain the coordinate information of the mouse, and follow Project the ray, analyze and find that the ray intersects with the best viewing area of the target instrument, and then use the difference movement algorithm to control the viewing angle to move to the best visual position;
[0086] At time T5, if the ray emitted by the mouse does not intersect any instrument, the global perspective is returned.
[0087] Part of the data in the above formula is calculated by removing the dimension and taking its numerical value. The formula is a formula closest to the actual situation obtained by software simulation of a large amount of collected data; the preset parameters and preset thresholds in the formula are set by technical personnel in this field according to actual conditions or obtained through simulation of a large amount of data.
[0088] The working principle of the present invention is as follows: the present invention obtains the position information of the mouse and determines the working mode according to the position information; in the viewing angle and sight distance change simulation mode, the movement signal of the mouse is obtained; according to the movement signal, it is judged whether the mouse is in the visual change simulation area; if yes, the overlapping part in the visual change simulation area is identified; if not, the visual target position of the next frame is calculated, and the collision blockage is identified; in the instrument operation mode, the coordinate information of the mouse is obtained, and a ray is emitted to the three-dimensional position pointed by the mouse in the screen space, and it is judged whether the ray hits the instrument's optimal viewing angle area; if yes, the viewing angle is controlled to move toward the optimal viewing angle area of the corresponding instrument; if not, the coordinate information of the mouse is continuously detected.
[0089] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A method for simulating the process of visual angle and distance transformation for simulation experiments, characterized in that: include: Step S1: obtaining the position information of the mouse, and determining the working mode according to the position information; wherein the working mode includes a viewing angle and sight distance change simulation mode and an instrument operation mode; Step S2: in the view angle and distance change simulation mode, obtain the movement signal of the mouse; determine whether the mouse is in the visual change simulation area according to the movement signal; if yes, identify the overlapping part in the visual change simulation area; if no, calculate the visual target position of the next frame and identify the collision blockage; Step S3: in the instrument operation mode, the coordinate information of the mouse is obtained, and a ray is emitted to the three-dimensional position pointed to by the mouse in the screen space to determine whether the ray hits the optimal viewing area of the instrument; if yes, the viewing angle is controlled to move to the optimal viewing area of the corresponding instrument; if no, the coordinate information of the mouse is continuously detected; The step of judging whether the mouse is in the viewing angle change simulation area according to the movement signal includes: Retrieve the current spatial coordinates of the mouse (Mx, My); map the instrument coordinates in the 3D scene to the screen space to obtain the mapping coordinates of the instrument; assume that the mapping coordinates are (Ox, Oy) and the radius is R; construct a view angle and distance change simulation area on the screen as ; Read the mouse input signal P1 in the first frame, and read the current mouse input signal P2 starting from the second frame; subtract the input signal P2 from the input signal P1 to obtain the change in the horizontal and vertical directions of the mouse ; Normalize the change to get the mouse displacement change vector ; judge Is it less than R? If yes, it is determined that the mouse is in the viewing angle change simulation area; if no, it is determined that the mouse is not in the viewing angle change simulation area; Identify overlapping parts within the visual change simulation area, including: Obtain the position information of each instrument and determine whether there is overlap based on the position information; if yes, analyze the target instrument based on the displacement change vector; if no, take the current instrument as the target instrument; Analyze target instruments based on displacement change vectors, including: Get the center position Oi of the best viewing angle of several instruments; call the position M of the mouse; calculate the vector between the mouse position and the center position as ; Where i is the number of the instrument, i=1,2,…,n, n is a positive integer; Calculated by vector dot multiplication and The angle θi is: ; Determine whether θi is less than 90 degrees; if yes, take the corresponding instrument as the target instrument, and control the viewing angle to interpolate and move toward the corresponding optimal visual position; if no, control the viewing angle to interpolate and move toward the corresponding optimal visual position in the reverse direction.
2. The method for simulating the visual angle and distance transformation process for simulation experiments according to claim 1, characterized in that: The determining of the working mode according to the position information includes: The position information of the mouse is retrieved, and it is determined whether the mouse is in the best viewing angle area according to the position information of the mouse; if yes, the working mode is switched to the instrument operation mode; if not, the working mode is kept as the viewing angle and sight distance change simulation mode.
3. The method for simulating the visual angle and distance transformation process for simulation experiments according to claim 1, characterized in that: The controlling the viewing angle to interpolate and move to the corresponding optimal visual position includes: Get the initial position K1 before the view moves, the last target position K2, and the target position K3; use the second-order Bezier curve formula as the motion formula to calculate the current position K with respect to the cumulative time t: ; When t is 0, K(0)=K1; when t is 1, K(1)=K3; then it is determined that the viewing angle moves to the optimal visual position.
4. The method for simulating the visual angle and distance transformation process for simulation experiments according to claim 1, characterized in that: The calculating of the visual target position of the next frame and identifying the collision blockage includes: Get the current 3D space coordinates of the view , calculate the three-dimensional space coordinates of the next frame perspective ; The calculation formula is: ; ; ; in, Represents the horizontal component of vector Dir; Represents the component of vector Dir in the vertical direction; Using collision detection algorithm to judge Is there a collision obstacle? If yes, stop the movement of the perspective; if not, use the interpolation movement algorithm to control the perspective to move to the corresponding three-dimensional space coordinates.
5. The method for simulating the visual angle and distance transformation process for simulation experiments according to claim 1, characterized in that: The step of judging whether the ray hits the optimal viewing angle of the instrument includes: The best viewing area of the instrument is marked as S, and the best visual position is marked as V; the coordinate position of the mouse on the near clipping plane of the viewing angle is obtained as P, and the coordinate position of the current viewing angle is obtained as Q; Along Direction casts a ray to determine whether the ray intersects with S; if so, the interpolation movement algorithm is used to control the view to move to the optimal visual position V, and the mouse no longer controls the view movement; if not, it switches to the view distance change simulation mode and returns to the global view.
6. The method for simulating the visual angle and distance transformation process for simulation experiments according to claim 5, characterized in that: The returning global perspective includes: Get the coordinates of the global perspective , the screen width is Width, the height is Height; the current spatial coordinates of the mouse are retrieved as ,when When , the position of the viewing angle , the interpolation movement algorithm is used to control the view to move toward K; otherwise, the movement of the view is terminated.