Method and device for generating virtual smooth curve

A smooth and curved technology, applied in the computer field, can solve problems such as the inability to meet the needs of users and the inability of Flex to draw virtual smooth curves.

Active Publication Date: 2017-10-24
ULTRAPOWER SOFTWARE
View PDF2 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The present invention provides a method and a device for generating a virtual smooth curve, so as to solve the problem that the existing Flex cannot draw a virtual smooth curve and cannot meet the needs of users

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for generating virtual smooth curve
  • Method and device for generating virtual smooth curve
  • Method and device for generating virtual smooth curve

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0043] figure 1 is a schematic flowchart of a method for generating imaginary smooth curves according to an embodiment of the present invention, see figure 1 , the method includes the following steps S11 to S14:

[0044] Step S11, obtaining the position of the original point;

[0045] In practical applications, it is necessary to obtain the position coordinates of the original points in advance, and then draw a Bezier curve passing through these original points according to the known position coordinates of the original points. The position of the original point here may be input by the user, or transmitted by other applications.

[0046] Step S12, calculate the position of the control point of the Bezier curve according to the positions of all the original points obtained, and use the position of the original point and the position of the control point to draw the Bezier curve;

[0047] A Bézier curve, also known as a Bézier curve or a Bézier curve, is a mathematical curve...

Embodiment 2

[0052] The focus of this embodiment is to describe the method for generating imaginary smooth curves to draw equal-spaced imaginary smooth curves. For other details, refer to other embodiments of the present invention.

[0053] It should be noted that when drawing a Bezier curve in Flex, the drawing method of the dotted line segment is actually to set the line style stroke.apply(g) and g.lineStyle(0,0,0) alternately at intervals when drawing the line. . The broken line drawing method is relatively simple. It is to divide the long line segment between two original points into several short line segments according to straight lines, and then change the line style alternately. However, the drawing of virtual smooth curve cannot combine the realization method of dashed polyline and the realization method of curve, but must be drawn in combination with the realization method of curve and the drawing method of the aforementioned dotted line segment.

[0054] In this embodiment, aft...

Embodiment 3

[0084] image 3 is a block diagram of a device for generating imaginary smooth curves according to an embodiment of the present invention, see image 3 , the device 30 for generating imaginary smooth curves includes:

[0085] An original point obtaining unit 301, configured to obtain the position of the original point;

[0086] The curve determination unit 302 is used to calculate the positions of the control points of the Bezier curve according to the positions of all the original points acquired by the original point acquisition unit 301, and draw the Bezier curve by using the positions of the original points and the positions of the control points;

[0087] The position calculation unit 303 is used to calculate the position of the dotted line segment and the solid line segment on the curve segment corresponding to every two adjacent original points during the process of drawing the Bezier curve;

[0088] The imaginary rounded curve generation unit 304 is used to set the l...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method and a device for generating a virtual smooth curve. The method includes the following steps: acquiring the positions of original points; calculating the positions of Bessel curve control points according to the acquired positions of all the original points; drawing a Bessel curve based on the positions of the original points and the positions of the control points; in the drawing process of the Bessel curve, calculating the positions of virtual line segments and solid line segments on the curve corresponding to every two adjunct original points; and setting the line style at the positions of the virtual line segments as a first line style and the line style at the positions of the solid line segments as a second line style according to the positions of the virtual line segments and the solid line segments on the curve to get a virtual smooth curve, and outputting the virtual smooth curve. The method is implemented based on the Bessel curve. Because the Bessel curve is smooth, the original points are connected using a smooth curve. A virtual line style is set at the positions of the virtual line segments on the curve. Therefore, a virtual smooth curve is drawn.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method and device for generating imaginary smooth curves. Background technique [0002] Web page layout is a key application of CSS (Cascading Style Sheets, Cascading Style Sheets). The traditional solution for web page layout is the box model, which relies on the display attribute + position attribute + float attribute. It is very inconvenient for those special layouts, for example, vertical centering is not easy to achieve. In 2009, W3C proposed a new solution - Flex layout, which can implement various page layouts in a simple, complete and responsive manner. Currently, Flex layouts are supported by all browsers. Flex (Flexible Box, flexible layout) is used to provide maximum flexibility for the box model. [0003] In actual use, some projects need to achieve the effect of imaginary smooth curves. It is relatively easy to implement curves in Flex technology in existing...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06T11/20
CPCG06T11/203
Inventor 李能进王庆磊
Owner ULTRAPOWER SOFTWARE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products