22
Sketch- and Constraint- Sketch- and Constraint- based Design of Curves and based Design of Curves and Surfaces Surfaces Yongwook Jeong Yongwook Jeong CS284 CS284 Fall 2004 Fall 2004

Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

  • View
    216

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

Sketch- and Constraint-based Sketch- and Constraint-based Design of Curves and SurfacesDesign of Curves and Surfaces

Yongwook JeongYongwook Jeong

CS284CS284

Fall 2004Fall 2004

Page 2: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

OverviewOverview

• Sketch-based User InterfaceSketch-based User Interface

• Curve-Manipulating based on Sketch Curve-Manipulating based on Sketch

• Curves and Surfaces Editing based on Curves and Surfaces Editing based on auxiliary planeauxiliary plane

Page 3: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

PapersPapers

• Barry Fowler and Richard Bartels, Barry Fowler and Richard Bartels, Constraint-Constraint-Based Curve Manipulation, 1993Based Curve Manipulation, 1993

• Thomas Baudel, Thomas Baudel, A Mark-Based Interaction A Mark-Based Interaction Paradigm for Free-Hand DrawingParadigm for Free-Hand Drawing, 1994, 1994

• Jonathan Cohen et al, Jonathan Cohen et al, An Interface for An Interface for Sketching 3D CurvesSketching 3D Curves, 1999, 1999

• Paul Michalik et al, Paul Michalik et al, Sketch- and Sketch- and Constraint-based Design of B-spline Constraint-based Design of B-spline SurfacesSurfaces, 2002, 2002

Page 4: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

Sketch-based Design?Sketch-based Design?

• Designers and architects hate control pointsDesigners and architects hate control points– The creation of complex free-form surface model The creation of complex free-form surface model

is a time-consuming and tedious process.is a time-consuming and tedious process.– It requires knowledge about the underlying curve It requires knowledge about the underlying curve

and surface representation.and surface representation.

• Indirect editingIndirect editing– Most systems such as Maya and Solidthinking Most systems such as Maya and Solidthinking

support indirect manipulating of control pointssupport indirect manipulating of control points

Page 5: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

Barry Fowler, Richard Bartels, Barry Fowler, Richard Bartels, ““Constraint-Based Curve Manipulation”Constraint-Based Curve Manipulation”

• The authors proposed a technique for direct The authors proposed a technique for direct manipulation of splines that manipulation of splines that permits moving permits moving any point on the curve instead of specific any point on the curve instead of specific control points.control points.

• This technique requires the introduction of This technique requires the introduction of constraintsconstraints to specify invariance of positions to specify invariance of positions or tangents to the curves.or tangents to the curves.

Page 6: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

A single constraint

A double constraint

A triple constraint

Page 7: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

Thomas Baudel, “Thomas Baudel, “A Mark-Based Interaction A Mark-Based Interaction Paradigm for Free-Hand DrawingParadigm for Free-Hand Drawing””

• Current methods for editing spline curves consist of Current methods for editing spline curves consist of moving control points and tangents to the curve.moving control points and tangents to the curve.

• The target users usually have some background in The target users usually have some background in mathematics enabling them to master easily the mathematics enabling them to master easily the peculiarities of the interaction technique.peculiarities of the interaction technique.

• ““Our design is based on patterns extracted from Our design is based on patterns extracted from their existing drawing and editing techniques rather their existing drawing and editing techniques rather than on a data representation focused on than on a data representation focused on mathematical models and computer management mathematical models and computer management of geometric data.”of geometric data.”

Page 8: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

Sample GesturesSample Gestures

Page 9: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

Cohen et al, “An Interface for Cohen et al, “An Interface for Sketching 3D Curves”Sketching 3D Curves”

• ““Although sketched curves are imprecise by Although sketched curves are imprecise by nature, sketching allows a user to quickly nature, sketching allows a user to quickly create a curve that is close to the desired create a curve that is close to the desired result.”result.”

• The user sketches a curve directly into a The user sketches a curve directly into a scene in two strokesscene in two strokes– First drawing the curve as it appears from the First drawing the curve as it appears from the

current viewpointcurrent viewpoint– And then sketching its approximate “shadow”And then sketching its approximate “shadow”

Page 10: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

ProcedureProcedure• Filtering the stroke to remove all Filtering the stroke to remove all

points whose screen-space points whose screen-space distance is less than some distance is less than some threshold from the previous pointthreshold from the previous point

• Fitting a Catmull-Rom spline to the Fitting a Catmull-Rom spline to the remaining points and sampling the remaining points and sampling the spline every few pixels to generate spline every few pixels to generate a smooth-looking polylinea smooth-looking polyline

• Projecting the 2D stroke onto a Projecting the 2D stroke onto a plane in world space to create a plane in world space to create a 3D planar curve3D planar curve– The first stroke defines an initial 2D The first stroke defines an initial 2D

curve.curve.

– The second stroke defines the The second stroke defines the curve’s shadow and its 3D shape.curve’s shadow and its 3D shape.

Page 11: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

ExamplesExamples

The user has sketched a camera path through this virtual environment. The user has sketched a camera path through this virtual environment. The curve was created from the viewpoint, in [a]. Figure [b] shows the The curve was created from the viewpoint, in [a]. Figure [b] shows the scene from a different viewpoint.scene from a different viewpoint.

Page 12: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

Sketch- and Constraint-based Design of Sketch- and Constraint-based Design of B-spline SurfacesB-spline Surfaces

• In this paper, the authors deal with the In this paper, the authors deal with the following issues.following issues.1.1. Touch and replace techniques for B-spline Touch and replace techniques for B-spline

curvescurves

2.2. Reliable interpretation of user’s pen-Reliable interpretation of user’s pen-strokes in 3Dstrokes in 3D

3.3. B-spline surface sculpting from arbitrary B-spline surface sculpting from arbitrary parametric-space curves by means of parametric-space curves by means of curve surface incidence constraints.curve surface incidence constraints.

Page 13: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

Sketching B-spline CurvesSketching B-spline Curves

• In order to get a reasonable In order to get a reasonable approximation, the authors take an approximation, the authors take an approach that starts with few control approach that starts with few control points, fits a curve, determines the points, fits a curve, determines the deviation of the fitted curve from the deviation of the fitted curve from the sampled points, and if necessary, sampled points, and if necessary, locally increases the number of locally increases the number of control points.control points.

C(u) = BiPii= 0

n

T = {u0,u1,u2,u3,...,un+1,un+2,un+3,un+4}

Page 14: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

Locally Editing a CurveLocally Editing a Curve

• After the initial sketch of the global After the initial sketch of the global curve, the user may modify the curve, the user may modify the drawing by re-sketching the curve drawing by re-sketching the curve locally.locally.– First, the shape information is First, the shape information is

extracted from the extracted from the touch-and-replace touch-and-replace strokestroke which has the form of a which has the form of a piecewise linear curve attached to the piecewise linear curve attached to the original curve original curve C(u)C(u). .

– With the shape information, a new With the shape information, a new local sub curve is approximated with local sub curve is approximated with the end conditions from the old curve. the end conditions from the old curve.

– It eventually replaces part of the old It eventually replaces part of the old curve.curve.

Page 15: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

Extract shape change informationExtract shape change information

123

Page 16: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004
Page 17: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

Constraint-based Sketching in 3DConstraint-based Sketching in 3D

• Reliable interpretation of user’s pen-strokes in 3D is Reliable interpretation of user’s pen-strokes in 3D is attempted by introducing “auxiliary sketching surfaces” attempted by introducing “auxiliary sketching surfaces” derived from the geometry of the surface and the derived from the geometry of the surface and the parametric representation of the 3D curve.parametric representation of the 3D curve.

• The initial pen stroke is projected into that plane and The initial pen stroke is projected into that plane and approximated by a planar B-spline curve.approximated by a planar B-spline curve.

• The system uses interference of subsequent pen-The system uses interference of subsequent pen-strokes with existing curves to embed the sketch into strokes with existing curves to embed the sketch into an auxiliary projection plane.an auxiliary projection plane.– For instance, if the user continues with another pen stroke For instance, if the user continues with another pen stroke

starting at (or close to) a previously sketched curve, the starting at (or close to) a previously sketched curve, the system selects between two alternative ways to compute the system selects between two alternative ways to compute the projection plane.projection plane.

Page 18: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

Interpretation of sketch strokes in 3DInterpretation of sketch strokes in 3D• The system selects between two The system selects between two

alternative ways to compute the alternative ways to compute the projection planeprojection plane

1.1. The stroke emanates from an The stroke emanates from an existing curve existing curve CC and ends in the and ends in the “air” (no other curve was hit)“air” (no other curve was hit)

2.2. If the stroke connects two existing If the stroke connects two existing curves, two curve points and the curves, two curve points and the bi-normal at the first curve point bi-normal at the first curve point are used to setup the projection are used to setup the projection plane.plane.

• Proceeding this way one or Proceeding this way one or several planar curves in 3D can be several planar curves in 3D can be generatedgenerated

• The Interpretation of the curve The Interpretation of the curve data as surfaces depends on the data as surfaces depends on the selected design “mode”. selected design “mode”.

Page 19: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

• Sweeping modeSweeping mode– the second stroke emanates at the second stroke emanates at

a planar curve drawn in the a planar curve drawn in the default plane, the first curve is default plane, the first curve is interpreted as an “axis-curve” interpreted as an “axis-curve” for sweeping the latter curve for sweeping the latter curve resulting in the surfaceresulting in the surface

• Skinning modeSkinning mode– Additional curves drawn onto Additional curves drawn onto

the previously generated the previously generated surface, and then orthogonal to surface, and then orthogonal to these new curves. these new curves.

– The 3D curves are interpreted The 3D curves are interpreted as skeleton curves for surface as skeleton curves for surface skinning procedure. For each skinning procedure. For each curve an incidence constraint is curve an incidence constraint is automatically generated and automatically generated and the surface which interpolates the surface which interpolates sketched 3D curves is sketched 3D curves is computed.computed.

Page 20: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

• Sculpting modeSculpting mode– The user selects a curve, The user selects a curve,

incident to an existing incident to an existing surface for sculpting.surface for sculpting.

– Other curves are either Other curves are either “fixed” ( their shape and “fixed” ( their shape and position may not change) position may not change) – or “free”. – or “free”.

– The selected curve is The selected curve is sculpted by further pen-sculpted by further pen-strokes within an auxiliary strokes within an auxiliary Frenet frame.Frenet frame.

Page 21: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

Constraint-based surface sculptingConstraint-based surface sculpting

Page 22: Sketch- and Constraint-based Design of Curves and Surfaces Yongwook Jeong CS284 Fall 2004

Thank you!Thank you!

Question?Question?