# US 2012/0075310 A1 · Arc spline gpu rasterization for cubic bezier drawing

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2012/0075310 A1
- Document ID: US20120075310A1
- Status: Published application
- Kind: A1
- Application number: 12/890,760
- Filed: 2010-09-27
- Published: 2012-03-29
- Earliest claimed: 2010-09-27
- Assignees: Microsoft Corporation
- Inventors: Ashraf A. Michail; David B. Teitlebaum; Brandon C. Furtwangler
- Web page: https://patentgrep.com/patent/US20120075310A1

## CPC

- G06T 11/23: using straight lines or curves
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

A curve drawing system is described herein that rasterizes arc splines in the GPU of a computer for cubic Bezier drawing of strokes and thin features. The curve drawing system first converts a cubic Bezier representation into an arc spline representation. Then the curve drawing system uses a similar approach to Loop/Blinn modified to cause the pixel shader to perform a point-in-circular-arc test instead of a point-in-Bezier test. Calculating arc radius is a much simpler operation than the alternatives and can be easily and efficiently performed by the pixel shader. Since the stroke of an arc spline is also an arc spline, the drawing system provides a resolution-independent representation of strokes. Thus, the curve drawing system allows several previously difficult graphical features to be efficiently drawn by readily available legacy hardware and used in software programs that are designed to run on a wide variety of hardware.

## Claims

### Claim 1

A computer-implemented method for drawing a stroked curve, the method comprising:
receiving a Bezier representation of a visual object to be rendered;
converting the Bezier representation into an arc spline representation;
triangulating the visual object described by the arc spline representation to produce one or more triangles for rendering;
performing one or more point-in-arc tests during rendering to determine one or more points that lie within the visual object represented by the arc spline representation; and
displaying the visual object using graphical hardware,
wherein the preceding steps are performed by at least one processor.

### Claim 2 (depends on 1)

The method of claim 1 wherein receiving the Bezier representation comprises receiving the representation from a graphical user interface component of a software application.

### Claim 3 (depends on 1)

The method of claim 1 wherein receiving the Bezier representation comprises an artistic stroke related to one or more Bezier curves.

### Claim 4 (depends on 1)

The method of claim 1 wherein receiving the Bezier representation comprises receiving a Bezier spline comprised of multiple Bezier curves that describe the visual object.

### Claim 5 (depends on 1)

The method of claim 1 wherein converting to an arc spline representation comprises identifying multiple circular arcs that approximate the same shape as the Bezier representation.

### Claim 6 (depends on 1)

The method of claim 1 wherein converting to an arc spline representation comprises converting to a representation from which distance to the curve can be determined within available graphics hardware.

### Claim 7 (depends on 1)

The method of claim 1 wherein the point-in-arc test allows determining a distance of a feature of the visual object from the arc spline without performing calculations from the Bezier representation.

### Claim 8 (depends on 1)

The method of claim 1 wherein triangulating comprises representing a shape of the visual object using a set of triangles for rendering with graphical hardware.

### Claim 9 (depends on 1)

The method of claim 1 further comprising rendering at least one arc in the arc spline representation directly with graphical hardware without using the triangulated representation.

### Claim 10 (depends on 1)

The method of claim 1 further comprising filling the visual object based on the arc spline representation and triangulation.

### Claim 11 (depends on 1)

The method of claim 1 wherein displaying the visual object comprises invoking a graphics processing unit (GPU) and providing the rendered output.

### Claim 12 (depends on 1)

The method of claim 1 wherein rendering the visual object comprises invoking one or more pixel shaders to render the visual object efficiently.

### Claim 13

A computer system for resolution-independent rendering of advanced curved objects, the system comprising:
a processor and memory configured to execute software instructions embodied within the following components;
an input component configured to receive a Bezier representation of a path describing one or more shapes;
a representation conversion component configured to convert the received Bezier representation into an arc spline representation;
a triangulation component configured to produce a set of triangles that represent the interior region of the path defined by the arc spline representation;
a point-in-arc test component configured to determine whether a particular point lies within an arc defined by the arc spline representation;
fill component configured to fill in the set of triangles to visually represent a shape to be rendered based on the received path; and
a rendering component configured to render the resulting shape produced by the other components using graphics hardware to produce a visual representation of the shape on a display device.

### Claim 14 (depends on 13)

The system of claim 13 wherein the input component is further configured to receive one or more data structures that describe the curves, and the region or regions that are defined as interior and exterior of the curves, wherein the interior portions are filled during rendering to create a displayed shape.

### Claim 15 (depends on 13)

The system of claim 13 wherein the representation conversion component is further configured to convert control points that define a Bezier to arcs of circles having a particular origin and radius that define an arc spline, wherein the arc spline representation allows determining distance for features near the arc spline based on radius.

### Claim 16 (depends on 13)

The system of claim 13 wherein the point-in-arc test component is further configured to operate on paths represented by an arc spline to determine whether a particular point lies within the interior region of a path defined by the arc spline.

### Claim 17 (depends on 13)

The system of claim 13 wherein the triangulation component is further configured to produce a representation of a shape that can be rendered by graphics hardware.

### Claim 18 (depends on 13)

The system of claim 13 further comprising a curve encoding component configured to encode two or more curves within a single triangle and determining an intersection of the curves for representing thin features.

### Claim 19 (depends on 13)

The system of claim 13 further comprising an antialiasing component configured to smooth edges of curves approximated by triangles to avoid visible rough edges.

### Claim 20

A computer-readable storage medium comprising instructions for controlling a computer system to draw advanced curves that include thin features, wherein the instructions, upon execution, cause a processor to perform actions comprising:
receiving a graphical representation of a thin stroke that, upon triangulation, includes one or more overlapping triangles, wherein triangulation represents one or more curves using one or more triangles that can be drawn by graphical hardware;
encoding a first curve in a triangle associated with the graphical representation of the thin stroke;
encoding a second curve in the same triangle as the first curve, wherein encoding both curves in the same triangle allows the curves to interact through intersection so that thin features can be easily represented without eliminating overlapping triangles;
determining an intersection of the first and second curves within the triangle, wherein the intersection defines at least one filled area between the two curves;
filling an interior region of the thin stroke determined by the intersection of the first and second curves within the triangulated area; and
rendering the triangle that includes the received thin stroke by invoking graphical hardware.
