Sketch-based editing of curves
First Claim
1. A computer-implemented method for editing a curve in an electronic document, comprising:
- displaying an existing curve on a graphical user interface;
receiving through the graphical user interface a sketch curve as input from a user, the sketch curve having two end points and being separately defined from the existing curve;
defining a target section of the existing curve by finding a point in the existing curve nearest each of the end points of the sketch curve, the target section being the part of the existing curve between the found points; and
replacing the target section of the existing curve with a new section.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus implementing a technique for editing an existing curve in a computer graphics system. In one aspect, a method includes receiving a sketch curve as input. The sketch curve has a first modification end point and a second modification end point. A target section of the existing curve is calculated by finding a first target end point and a second target end point in the existing curve. The first target end point is a point on the existing curve closest to the first modification end point and the second target end point is a point on the existing curve closest to the second modification end point. The target section is removed from the existing curve. A replacement curve is created and is inserted into the existing curve in place of the target section. The existing curve and the replacement curve are faired at their respective neighboring end points.
89 Citations
25 Claims
-
1. A computer-implemented method for editing a curve in an electronic document, comprising:
-
displaying an existing curve on a graphical user interface;
receiving through the graphical user interface a sketch curve as input from a user, the sketch curve having two end points and being separately defined from the existing curve;
defining a target section of the existing curve by finding a point in the existing curve nearest each of the end points of the sketch curve, the target section being the part of the existing curve between the found points; and
replacing the target section of the existing curve with a new section. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 24)
shortening the replacement curve at each end point of the replacement curve;
shortening the existing curve at each internal end point; and
forming fillet curves to join the shortened replacement curve and the shortened existing curve.
-
-
4. The method of claim 3 where each end of each pair of adjoining shortened ends of the existing curve and the replacement curve is shortened by the same amount.
-
5. The method of claim 3 where each of the shortened ends is shortened by an amount calculated from the size of the gap adjoining the shortened end.
-
6. The method of claim 1 where the replacement curve is the sketch curve.
-
7. The method of claim 1 where creating the replacement curve comprises smoothing the target section to form the replacement curve.
-
8. The method of claim 7 where smoothing the target section comprises:
-
forming an ordered sequence of points representing the target section;
grouping the points of the ordered sequence of points into one or more contiguous segments of points;
smoothing the points of each segment to generate a segment of smoothed points; and
fitting one or more mathematical curves to each segment of smoothed points, the one or more mathematical curves together forming the replacement curve.
-
-
9. The method of claim 8 where forming an ordered sequence of points comprises selecting points so that:
-
a spacing distance between points in the ordered sequence of points does not exceed a maximum spacing; and
a flatness distance between a straight line formed between two consecutive points in the ordered sequence of points and the target section does not exceed a flatness tolerance.
-
-
10. The method of claim 1 where the existing curve is a trajectory curve of a brush stroke having an envelope, the method further comprising calculating a new envelope for a new brush stroke using the edited trajectory curve and envelope information of the existing brush stroke.
-
24. The method of claim 1, wherein replacing the target section with a new section comprises:
-
removing the target section from the existing curve, leaving two internal end points in the existing curve;
creating a replacement curve, the replacement curve having two end points;
inserting the replacement curve into the existing curve in place of the target section; and
fairing the existing curve and the replacement curve at their respective neighboring end points to close a gap at each end point between the existing curve and the replacement curve.
-
-
11. A method for interacting with a user of an interactive graphics system, comprising:
-
displaying a curve on a display device;
providing to the user a smoothing tool operable under control of the user through a graphical user interface;
receiving a gesture from the user moving the smoothing tool over a part of the curve to indicate a selection of the part of the curve; and
smoothing the selected part of the curve by applying a smoothing filter to the selected part of the curve. - View Dependent Claims (12)
providing to the user a smoothing tool operable under control of the user through a graphical user interface to select a sample of the curve, to smooth the selected sample as a separate curve, and to refit the smoothed sample into the curve.
-
-
13. A method of editing a brush stroke in a graphics system in which a brush stroke includes a trajectory curve, an envelope curve, and envelope information, comprising:
-
displaying a brush stroke on a graphical user interface;
editing a trajectory curve of the brush stroke by sketch-based editing, sketch-based editing comprising receiving through the graphical user interface a sketch curve as input and modifying the trajectory curve based on the sketch curve; and
calculating a new envelope curve for a new brush stroke using the edited trajectory curve and the envelope information of the existing brush stroke. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20)
using the sketch curve to identify a target section on the trajectory curve, where end points of the target section are points on the trajectory curve nearest to end points of the sketch curve;
replacing the target section with the sketch curve in the trajectory curve; and
fairing the trajectory curve and the sketch curve to each other to create the edited trajectory curve.
-
-
15. The method of claim 13 where sketch-based editing comprises:
-
using the sketch curve to identify a target section on the trajectory curve, where end points of the target section are points on the trajectory curve nearest to end points of the sketch curve;
smoothing the target section;
replacing the target section with the smoothed target section in the trajectory curve; and
fairing the trajectory curve and the smoothed target section to each other to create the edited trajectory curve.
-
-
16. The method of claim 13 where calculating a new envelope curve for a new brush stroke comprises:
calculating new envelope information for the edited trajectory curve by mapping envelope information from the original trajectory curve to the edited trajectory curve.
-
17. The method of claim 13 wherein calculating a new envelope curve for a new brush stroke comprises:
-
calculating new envelope information by linearly interpolating envelope information of the trajectory curve of the existing brush stroke based on arc-lengths of the edited trajectory curve and arc-lengths of the trajectory curve of the existing brush stroke;
applying the new envelope information to the edited trajectory curve.
-
-
18. The method of claim 13 where envelope information comprises:
-
a brush shape; and
one or more affine matrices defining modifications to be made to the brush shape at a corresponding one or more positions along the trajectory curve.
-
-
19. The method of claim 18 where the affine matrix is calculated using data received from an input device in response to physical manipulation of the input device by a user.
-
20. The method of claim 19 where the user defines conversion parameters for converting the data received from the input device to the values in the affine matrices.
-
21. A computer program product stored on a computer-readable medium for interacting with a user editing a curve, the product comprising instructions operable for causing a programmable processor to:
-
display an existing curve on a graphical user interface;
receive through the graphical user interface a sketch curve as input from a user, the sketch curve having two end points and being separately defined from the existing curve;
define a target section of the existing curve by finding a point in the existing curve nearest each of the end points of the sketch curve, the target section being the part of the existing curve between the found points; and
replace the target section of the existing curve with a new section. - View Dependent Claims (25)
remove the target section from the existing curve, leaving two internal end points in the existing curve;
create a replacement curve, the replacement curve having two end points;
insert the replacement curve into the existing curve in place of the target section; and
join the existing curve and the replacement curve at their respective neighboring end points by fairing to close a gap at each end point between the existing curve and the replacement curve.
-
-
22. A computer program, residing on a computer-readable medium, comprising instructions for causing a computer to:
-
provide to the user a smoothing tool operable under control of the user through a graphical user interface;
receive a gesture from the user moving the smoothing tool over a part of the curve to indicate a selection of the part of the curve; and
smooth the selected part of the curve by applying a smoothing filter to the selected part of the curve.
-
-
23. A system for editing a brush stroke in a graphics system in which a brush stroke includes a trajectory curve, an envelope curve, and envelope information, comprising:
-
means for displaying a brush stroke on a graphical user interface;
means for editing a trajectory curve of the brush stroke by sketch-based editing, sketch-based editing comprising receiving through the graphical user interface a sketch curve as input and modifying the trajectory curve based on the sketch curve; and
means for calculating a new envelope curve for a new brush stroke using the edited trajectory curve and the envelope information of the existing brush stroke.
-
Specification