# US 8,786,606 B2 · Point containment for quadratic Bèzier strokes

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

- Number: US 8,786,606 B2
- Document ID: US8786606B2
- Status: Granted
- Kind: B2
- Application number: 13/097,993
- Filed: 2011-04-29
- Published: 2011-11-24
- Granted: 2014-07-22
- Earliest claimed: 2010-05-21
- Assignees: NVIDIA Corporation
- Applicants: Mark J. Kilgard
- Inventors: Mark J. Kilgard
- Web page: https://patentgrep.com/patent/US8786606B2

## CPC

- G06T 15/005: {General purpose rendering architectures}
- G06T 11/23: using straight lines or curves
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

One embodiment of the present invention sets forth a technique for stroking rendered paths. Path rendering may be accelerated when a graphics processing unit or other processor is configured to identify pixels that are within half of the stroke width of any point along a path to be stroked. The path is represented by quadratic Bèzier segments and a cubic equation is evaluated to determine whether or not each point in a conservative hull that bounds the quadratic Bèzier segment is within the stroke width.

## Claims

### Claim 1

A method of stroking quadratic Bèzier path segments, the method comprising:
receiving a quadratic Bèzier path segment and a stroke width that defines a stroke region of the quadratic Bezier path segment;
generating a hull geometry that bounds the quadratic Bèzier path segment;
computing a set of parameters for the quadratic Bèzier path segment;
for each sample point within the hull geometry, writing a result to a stencil buffer indicating whether the sample point is within the stroke region of the quadratic Bèzier path segment by evaluating a sample point-specific cubic equation based on the set of parameters; and
filling, via a processing unit, the stroke region by writing a color buffer based on the stencil buffer.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
receiving a second quadratic Bèzier path segment; and
replacing the second quadratic Bèzier path segment with a line segment or a point when the second quadratic Bèzier path segment is degenerate.

### Claim 3 (depends on 1)

The method of claim 1, wherein the set of parameters are computed based vertex positions of the hull geometry.

### Claim 4 (depends on 1)

The method of claim 1, further comprising interpolating the set of parameters over the hull geometry to generate scalar linear coefficients.

### Claim 5 (depends on 4)

The method of claim 4, wherein the interpolating is performed using centroid sampling.

### Claim 6 (depends on 4)

The method of claim 4, wherein the interpolating is performed at pixel centers.

### Claim 7 (depends on 1)

The method of claim 1, wherein the quadratic Bèzier path segment is a portion of a path, the path is defined by the quadratic Bèzier path segment and additional quadratic Bèzier path segments, and further comprising
generating additional hull geometries that bound the additional quadratic Bèzier path segments;
computing additional sets of parameters for the additional quadratic Bèzier path segments; and
for each sample point within the additional hull geometries, evaluating a sample point-specific cubic equation based on the respective additional set of parameters to determine whether the sample point is within a stroke region of the path.

### Claim 8 (depends on 7)

The method of claim 7, wherein the stencil buffer stores data indicating the sample points that are within the stroke region of the path and the stroke region of the quadratic Bèzier path segment.

### Claim 9 (depends on 8)

The method of claim 8, further comprising
generating a second hull geometry that bounds the path; and
processing the second hull geometry to stroke the path based on the stencil buffer.

### Claim 10 (depends on 1)

The method of claim 1, further comprising discarding sample points that are outside of a parametric range of the quadratic Bèzier path segment.

### Claim 11 (depends on 1)

The method of claim 1, further comprising writing a color buffer for sample points that are determined to be within the stroke region.

### Claim 12

A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to stroke quadratic Bèzier path segments, by performing the steps of:
receiving a quadratic Bèzier path segment and a stroke width that defines a stroke region of the quadratic Bèzier path segment;
generating a hull geometry that bounds the quadratic Bèzier path segment;
computing a set of parameters for the quadratic Bèzier path segment;
for each sample point within the hull geometry, writing a result to a stencil buffer indicating whether the sample point is within the stroke region of the quadratic Bèzier path segment by evaluating a sample point-specific cubic equation based on the set of parameters; and
filling the stroke region by writing a color buffer based on the stencil buffer.

### Claim 13 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, further comprising:
receiving a second quadratic Bèzier path segment; and
replacing the second quadratic Bèzier path segment with a line segment or a point when the second quadratic Bèzier path segment is degenerate.

### Claim 14 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, wherein the set of parameters are computed based vertex positions of the hull geometry.

### Claim 15 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, further comprising interpolating the set of parameters over the hull geometry to generate scalar linear coefficients.

### Claim 16 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, wherein the quadratic Bèzier path segment is a portion of a path, the path is defined by the quadratic Bèzier path segment and additional quadratic Bèzier path segments, and further comprising
generating additional hull geometries that bound the additional quadratic Bèzier path segments;
computing additional sets of parameters for the additional quadratic Bèzier path segments; and
for each sample point within the additional hull geometries, evaluating a sample point-specific cubic equation based on the respective additional set of parameters to determine whether the sample point is within a stroke region of the path.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein the stencil buffer stores data indicating the sample points that are within the stroke region of the path and the stroke region of the quadratic Bèzier path segment.

### Claim 18 (depends on 17)

The non-transitory computer-readable storage medium of claim 17, further comprising
generating a second hull geometry that bounds the path; and
processing the second hull geometry to stroke the path based on the stencil buffer.

### Claim 19 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, further comprising writing a color buffer for sample points that are determined to be within the stroke region.

### Claim 20

A system for stroking quadratic Bèzier path segments, the system comprising:
a memory that is configured to store data indicating whether sample points are within a stroke region of a path; and
a processor that is coupled to the memory and configured to:
receive a quadratic Bèzier path segment and a stroke width that defines the stroke region;
generate a hull geometry that bounds the quadratic Bèzier path segment;
compute a set of parameters for the quadratic Bèzier path segment;
for each sample point within the hull geometry, write a result to a stencil buffer indicating whether the sample point is within the stroke region of the quadratic Bèzier path segment by evaluate a sample point-specific cubic equation based on the set of parameters; and
filling the stroke region by writing a color buffer based on the stencil buffer.
