Method for fitting rotation of three-dimensional vehicle speed pointer
By using GIMP tools to depict the elliptical trajectory on a full LCD screen and combining polynomial function fitting technology, the three-dimensional rotation of the pointer along the elliptical trajectory is achieved, solving the problem that the existing technology cannot achieve irregular motion trajectory, and providing better 3D visual experience and performance optimization.
Patent Information
- Application Number
- CN202411703988.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-18
AI Technical Summary
The prior art cannot realize the irregular motion trajectory of the pointer on a full liquid crystal screen, especially the three-dimensional display effect.
By using the GIMP drawing tool to depict the ellipse trajectory, select the sampling points and calculate their coordinates, and combine polynomial function fitting technology to achieve three-dimensional rotation of the pointer along the ellipse trajectory.
The irregular rotation effect of the pointer is realized, providing a more intuitive and beautiful 3D visual experience, and at the same time, algorithms and models are optimized, computing resource consumption and CPU load are reduced.
Smart Images

Figure CN119648965A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle technology, and in particular to a method for fitting the rotation of a three-dimensional vehicle speed pointer. Background Art
[0002] With the development of technology, vehicles are becoming more and more intelligent, and instrument systems are also improved. On existing vehicles, a physical instrument panel is generally used, and the speed pointer rotates on the two-dimensional plane of the instrument panel.
[0003] However, some car models use a full LCD screen instead of a physical instrument panel to display vehicle information on the full LCD screen. For example, the vehicle speed is displayed on the full LCD screen, that is, the speed pointer is displayed in three-dimensional simulation.
[0004] like Figure 1 As shown, the full LCD screen display abstracts the instrument screen into a coordinate system. For example, the upper left corner of a 1920*720 screen is the coordinate origin (0,0), and the lower right corner coordinate is (1920,720); then various pictures of the required effects are mapped according to the coordinates to achieve the desired effect.
[0005] like Figure 2 As shown, the pointer image 1 (which contains the pointer 11 and the dotted line is the image boundary) is rotated around the center (x0, y0) to obtain a rotation trajectory 2. The image coordinates (x, y) are calculated by the rotation angle a and the rotation radius R, x=x0+sina, y=y0+cosa. At the same time, when the image is rotated to the corresponding position, the image is rotated by the same angle a to achieve the effect of rotating the pointer 11.
[0006] However, the existing technology can only realize the standard circular trajectory movement of the pointer image. When an irregular motion trajectory (ellipse) appears, special effects such as three-dimensional display cannot be achieved. Summary of the invention
[0007] In view of the problem that the full liquid crystal screen in the prior art cannot realize the irregular motion trajectory of the pointer, the present invention proposes a method for fitting the rotation of a three-dimensional vehicle speed pointer.
[0008] In order to achieve the above object, the present invention provides the following technical solutions:
[0009] A method for fitting the rotation of a three-dimensional vehicle speed pointer comprises the following steps:
[0010] S1: First, use the GIMP drawing tool to draw the ellipse trajectory to form an ellipse curve, and obtain the starting point, end point and control point;
[0011] S2: Select M sampling points arbitrarily on the elliptic curve and read the coordinates of the sampling points (xi ,y i );
[0012] S3: Calculate the distances between the M sampling points and the center of the circle respectively, so as to obtain the radius of the corresponding sampling point;
[0013] S4: Calculate the ratio of the radius of the sampling point to the radius R1 of the initial position to obtain a ratio set {P1, P2, ..., P i};
[0014] S5: Divide the angle from the starting point to the end point into M parts, and compare them with the ratio set {P1, P2, ..., P i}One to one correspondence;
[0015] S6: Use the rotation angle a as the independent variable and the ratio set as the dependent variable to perform polynomial function fitting to achieve three-dimensional rotation of the pointer along the elliptical trajectory.
[0016] Preferably, in S2, M is 200.
[0017] Preferably, in S2, the Bessel formula is:
[0018] p(t)=(1-t) 2 ·p0+2t(1-t)·p1+t 2 ·p2 (1)
[0019] In formula (1), p(t) represents the coordinates of the sampling point p; p0 represents the coordinates of the starting point; p1 represents the coordinates of the control point; p2 represents the coordinates of the end point; and t represents the path position of the movement.
[0020] Preferably, in S3, the radius of the sampling point is calculated as:
[0021]
[0022] In formula (2), R i represents the distance between the i-th sampling point and the center of the circle; (x i ,y i ) represents the coordinates of the i-th sampling point; (x0, y0) represents the coordinates of the center of the circle; i≤M, M represents the number of sampling points.
[0023] Preferably, in S4, the ratio set is:
[0024]
[0025] In formula (3), P i Represents the radius R of the i-th sampling point i The ratio of the radius R1 to the initial position.
[0026] Preferably, in S6, the polynomial function fitting formula is:
[0027] R=R1*(a4*x 4 +a3*x 3 +a2*x 2 +a1*x+a0) (4)
[0028] In formula (4), R represents the radius of the sampling point; R1 represents the radius of the initial position; a4, a3, a2, a1, and a0 are design coefficients.
[0029] In summary, due to the adoption of the above technical solution, compared with the prior art, the present invention has at least the following beneficial effects:
[0030] The present invention achieves special display effects through data fitting. For example, in graphics processing and visualization, smooth curves and graphics can be generated through fitting technology, providing more intuitive and beautiful 3D visual effects.
[0031] At the same time, less computing power is used to achieve more complex effects. In addition to the irregular rotation of the pointer, it can also be applied to the irregular movement of most pictures, animation display, etc. It can optimize algorithms and models, reduce unnecessary calculations and resource consumption, thereby reducing CPU load and improving the overall performance and response speed of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 FIG. 4 is a schematic diagram of full liquid crystal screen coordinates according to an exemplary embodiment of the present invention.
[0033] Figure 2 Schematic diagram of a circular trajectory according to an exemplary embodiment of the present invention.
[0034] Figure 3 The figure is a schematic diagram of a method for fitting the rotation of a three-dimensional vehicle speed pointer according to an exemplary embodiment of the present invention.
[0035] Figure 4 Schematic diagram of an elliptical trajectory according to an exemplary embodiment of the present invention.
[0036] Figure 5 Schematic diagram for comparing trajectory display effects according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0037] The present invention is further described in detail below in conjunction with the examples and specific implementation methods. However, this should not be understood as the scope of the above subject matter of the present invention being limited to the following examples, and all technologies realized based on the content of the present invention belong to the scope of the present invention.
[0038] In the description of the present invention, it is necessary to understand that the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0039] When you need to achieve an elliptical trajectory effect on the screen: rotate the pointer image around the center of the circle (x0, y0), but the rotation radius is not fixed, so the image coordinates (x, y) cannot be calculated using the circular formula, and the effect of the pointer rotating along the elliptical trajectory cannot be achieved.
[0040] Therefore, if Figure 3 As shown, the present invention provides a method for fitting the rotation of a three-dimensional vehicle speed pointer, which specifically includes the following steps:
[0041] S1: First, use the Bezier curve in the GIMP drawing tool to draw the ellipse trajectory through the Bezier high-order formula (that is, draw a Bezier curve through the drawing tool to overlap the preset ellipse boundary) to form an ellipse curve, and obtain the starting point, end point and control point required by the Bezier formula.
[0042] In this embodiment, the elliptical curve trajectory of the pointer rotation is pre-set according to design requirements. It is only necessary to use a drawing tool to draw a Bezier curve overlapping the preset elliptical boundary. The drawing tool will have the point coordinates of the Bezier curve, and the coordinates can be read directly.
[0043] S2: Select M sampling points arbitrarily on the elliptic curve and read the coordinates of the sampling points (x i ,y i ), i≤M.
[0044] In this embodiment, M is preferably 200.
[0045] In this embodiment, the Bezier formula (the example is second order, the higher the order, the more complex the curve) can be obtained from the starting point, the end point and the control point of the Bezier curve, which represents the coordinate function of the sampling point P moving from the starting point to the end point:
[0046] p(t)=(1-t) 2 ·p0+2t(1-t)·p1+t 2 ·p2 (1)
[0047] In formula (1), p(t) represents the coordinates of the sampling point p; p0 represents the coordinates of the starting point; p1 represents the coordinates of the control point; p2 represents the coordinates of the end point; and t represents the path position of the movement.
[0048] S3: Calculate the sampling points (x i ,y i ) and the distance between the center (x0, y0), thereby obtaining the corresponding radius R i ,like Figure 4 shown.
[0049]
[0050] In formula (2), R i represents the distance between the i-th sampling point and the center of the circle; (x i ,y i ) represents the coordinates of the i-th sampling point; (x0, y0) represents the coordinates of the center of the circle; i≤M.
[0051] S4: Set the radius of the initial position (i.e., the starting point of the elliptical trajectory) as R1, calculate the radius of the sampling point and R1, and obtain the ratio set {P1, P2, ..., P i}, i≤M:
[0052]
[0053] In formula (3), P i Represents the radius R of the i-th sampling point i The ratio of the radius R1 to the initial position.
[0054] S5: Divide the angle from the starting point to the end point into M parts, and compare them with the ratio set {P1, P2, ..., P i}One-to-one correspondence, a data set between rotation angle and radius is obtained.
[0055] S6: Use the function fitting tool in Matlab to fit the polynomial function with the rotation angle a as the independent variable and P as the dependent variable to get the fitting formula between the rotation angle a and the radius R, so as to realize the rotation of the pointer along the elliptical trajectory. Use the code to calculate this function to get the radius R at the corresponding angle.
[0056] R=R1*(a4*x 4 +a3*x 3 +a2*x 2 +a1*x+a0) (4)
[0057] In formula (4), R represents the radius of the sampling point; R1 represents the radius of the initial position; a4, a3, a2, a1, and a0 are design coefficients.
[0058] like Figure 5 As shown, the existing circular track effect is 2D, and the elliptical track realized by the present invention can achieve a 3D effect, bringing a better experience to users.
[0059] The present invention has the following advantages:
[0060] 1. Improve efficiency and performance: Through data fitting, algorithms and models can be optimized, unnecessary calculations and resource consumption can be reduced, thereby reducing CPU load and improving the overall performance and response speed of the system.
[0061] 2. Data fitting technology can be used to achieve special display effects. For example, in graphics processing and visualization, fitting technology can generate smooth curves and graphics, providing more intuitive and beautiful 3D visual effects.
[0062] 3. Use less computing power to achieve more complex effects. In addition to irregular rotation of the pointer, it can also be applied to irregular movement of most pictures, animation display, etc.
[0063] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present invention, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.
Claims
1. A method for fitting the rotation of a three-dimensional vehicle speed pointer, characterized in that: The specific steps include: S1: First, use the GIMP drawing tool to draw the ellipse trajectory to form an ellipse curve, and obtain the starting point, end point and control point; S2: Select M sampling points arbitrarily on the elliptic curve and read the coordinates of the sampling points (x i ,y i ); S3: Calculate the distances between the M sampling points and the center of the circle respectively, so as to obtain the radius of the corresponding sampling point; S4: Calculate the ratio of the radius of the sampling point to the radius R1 of the initial position to obtain the ratio set P1, P2, ..., P i }; S5: Divide the angle from the starting point to the end point into M parts, and compare them with the ratio set {P1,P2,...,P i One to one correspondence; S6: Use the rotation angle a as the independent variable and the ratio set as the dependent variable to perform polynomial function fitting to achieve three-dimensional rotation of the pointer along the elliptical trajectory.
2. A method for fitting the rotation of a three-dimensional vehicle speed pointer as claimed in claim 1, characterized in that: In S2, M is 200.
3. A method for fitting the rotation of a three-dimensional vehicle speed pointer as claimed in claim 1, characterized in that: In S2, the Bessel formula is: p(t)=(1-t) 2 ·p0+2t(1-t)·p1+t 2 ·p2 (1) In formula (1), p(t) represents the coordinates of the sampling point p; p0 represents the coordinates of the starting point; p1 represents the coordinates of the control point; p2 represents the coordinates of the end point; and t represents the path position of the movement.
4. A method for fitting the rotation of a three-dimensional vehicle speed pointer as claimed in claim 1, characterized in that: In S3, the radius of the sampling point is calculated as: In formula (2), R i represents the distance between the i-th sampling point and the center of the circle; (x i ,y i ) represents the coordinates of the i-th sampling point; (x0, y0) represents the coordinates of the center of the circle; i≤M, M represents the number of sampling points.
5. A method for fitting the rotation of a three-dimensional vehicle speed pointer as claimed in claim 1, characterized in that: In S4, the ratio set is: In formula (3), P i Represents the radius R of the i-th sampling point i The ratio of the radius R1 to the initial position.
6. A method for fitting the rotation of a three-dimensional vehicle speed pointer as claimed in claim 1, characterized in that: In S6, the polynomial function fitting formula is: R=R1*(a4*x 4 +a3*x 3 +a2*x 2 +a1*x+a0) (4) In formula (4), R represents the radius of the sampling point; R1 represents the radius of the initial position; a4, a3, a2, a1, and a0 are design coefficients.
Citation Information
Patent Citations
Circular deflection pointer type meter reading correction method
CN107766836A
Animation effect implementation method and device and storage equipment
CN107945253A
Auxiliary method, system and device for displaying element gradual change effect of liquid crystal meter
CN109130855A
Reading correction system and method for inclined pointer type instrument image of transformer substation
CN112906694A