Skip to main content
added 398 characters in body
Source Link
Simon F
  • 4.3k
  • 13
  • 30

IIRC, Watt and Watt's "Advanced Animation and Rendering Techniques" (Chapter 3) has an interesting discussion on this (which I think is summarising the work of Clark https://dl.acm.org/doi/10.1145/965103.807440 ... but only the first page seems to be there :-( )

Failing thatUPDATE: There is some text from Watt and Watt describing Clark's method available here:

If that's not to your taste, you could try the following: Take the Cubic Bezier cage - shown in green - with the curve in purple:

Bezier (Possibly not 100% accurate)

If you do a do a mid-point subdivision of the curve, you can measure the (squared) distance (red) from the centre of the straight line (blue) joining the original end points to the mid point of your curve. If this exceeds a threshold (some number of pixels), recurse, else stop.

I seem to recall that the difference between the straight-line approx and the curve drops by a factor of 4 (or was it 8??) with each subdivision, so it converges quite rapidly.

The maths to subdivide the 4 control points of any Cubic Bezier into 2 smaller Beziers is quite simple .. but I'd need to go and look it up ;-)...

Update 2: See here for splitting a Bezier in 'twain'

Though, thinking about it, I'd say you might need to go one more step to account for this type of starting case:

enter image description here

IIRC, Watt and Watt's "Advanced Animation and Rendering Techniques" (Chapter 3) has an interesting discussion on this (which I think is summarising the work of Clark https://dl.acm.org/doi/10.1145/965103.807440 ... but only the first page seems to be there :-( )

Failing that, you could try the following: Take the Cubic Bezier cage shown in green with curve in purple:

Bezier (Possibly not 100% accurate)

If you do a do a mid-point subdivision of the curve, you can measure the (squared) distance (red) from the centre of the straight line (blue) joining the original end points to the mid point of your curve. If this exceeds a threshold (some number of pixels), recurse, else stop.

I seem to recall that the difference between the straight-line approx and the curve drops by a factor of 4 (or was it 8??) with each subdivision, so it converges quite rapidly.

The maths to subdivide the 4 control points of any Cubic Bezier into 2 smaller Beziers is quite simple .. but I'd need to go and look it up ;-)

Though, thinking about it, I'd say you might need to go one more step to account for this type of starting case:

enter image description here

IIRC, Watt and Watt's "Advanced Animation and Rendering Techniques" (Chapter 3) has an interesting discussion on this (which I think is summarising the work of Clark https://dl.acm.org/doi/10.1145/965103.807440 ... but only the first page seems to be there :-( )

UPDATE: There is some text from Watt and Watt describing Clark's method available here:

If that's not to your taste, you could try the following: Take the Cubic Bezier cage - shown in green - with the curve in purple:

Bezier (Possibly not 100% accurate)

If you do a do a mid-point subdivision of the curve, you can measure the (squared) distance (red) from the centre of the straight line (blue) joining the original end points to the mid point of your curve. If this exceeds a threshold (some number of pixels), recurse, else stop.

I seem to recall that the difference between the straight-line approx and the curve drops by a factor of 4 (or was it 8??) with each subdivision, so it converges quite rapidly.

The maths to subdivide the 4 control points of any Cubic Bezier into 2 smaller Beziers is quite simple .. but I'd need to go and look it up ...

Update 2: See here for splitting a Bezier in 'twain'

Though, thinking about it, I'd say you might need to go one more step to account for this type of starting case:

enter image description here

formatting
Source Link
Simon F
  • 4.3k
  • 13
  • 30

IIRC, Watt and Watt's "Advanced Animation and Rendering Techniques" (Chapter 3) has an interesting discussion on this (which I think is summarising the work of Clark https://dl.acm.org/doi/10.1145/965103.807440 ... but only the first page seems to be there :-( )

Failing that, you could try the following: Take the Cubic Bezier cage shown in green with curve in purple:

Bezier (Possibly not 100% accurate)

If you do a do a mid-point subdivision of the curve, you can measure the (squared) distance (red) from the centre of the straight line (blue) joining the original end points to the mid point of your curve. If this exceeds a threshold (some number of pixels), recurse, else stop.

I seem to recall that the difference between the straight-line approx and the curve drops by a factor of 4 (or was it 8??) with each subdivision, so it converges quite rapidly.

The maths to subdivide the 4 control points of any Cubic Bezier into 2 smaller Beziers is quite simple .. but I'd need to go and look it up ;-)

Though, thinking about it, I'd say you might need to go one more step to account for this type of starting case:   

enter image description here

IIRC, Watt and Watt's "Advanced Animation and Rendering Techniques" (Chapter 3) has an interesting discussion on this (which I think is summarising the work of Clark https://dl.acm.org/doi/10.1145/965103.807440 ... but only the first page seems to be there :-( )

Failing that, you could try the following: Take the Cubic Bezier cage shown in green with curve in purple:

Bezier (Possibly not 100% accurate)

If you do a do a mid-point subdivision of the curve, you can measure the (squared) distance (red) from the centre of the straight line (blue) joining the original end points to the mid point of your curve. If this exceeds a threshold (some number of pixels), recurse, else stop.

I seem to recall that the difference between the straight-line approx and the curve drops by a factor of 4 (or was it 8??) with each subdivision, so it converges quite rapidly.

The maths to subdivide the 4 control points of any Cubic Bezier into 2 smaller Beziers is quite simple .. but I'd need to go and look it up ;-)

Though, thinking about it, I'd say you might need to go one more step to account for this type of starting case:  enter image description here

IIRC, Watt and Watt's "Advanced Animation and Rendering Techniques" (Chapter 3) has an interesting discussion on this (which I think is summarising the work of Clark https://dl.acm.org/doi/10.1145/965103.807440 ... but only the first page seems to be there :-( )

Failing that, you could try the following: Take the Cubic Bezier cage shown in green with curve in purple:

Bezier (Possibly not 100% accurate)

If you do a do a mid-point subdivision of the curve, you can measure the (squared) distance (red) from the centre of the straight line (blue) joining the original end points to the mid point of your curve. If this exceeds a threshold (some number of pixels), recurse, else stop.

I seem to recall that the difference between the straight-line approx and the curve drops by a factor of 4 (or was it 8??) with each subdivision, so it converges quite rapidly.

The maths to subdivide the 4 control points of any Cubic Bezier into 2 smaller Beziers is quite simple .. but I'd need to go and look it up ;-)

Though, thinking about it, I'd say you might need to go one more step to account for this type of starting case: 

enter image description here

added 15 characters in body
Source Link
Simon F
  • 4.3k
  • 13
  • 30

IIRC, Watt and Watt's "Advanced Animation and Rendering Techniques" (Chapter 3) has an interesting discussion on this (which I think is summarising the work of Clark https://dl.acm.org/doi/10.1145/965103.807440 ... but only the first page seems to be there :-( )

Failing that, you could try the following: Take the Cubic Bezier cage shown in green with curve in purple:

Bezier (Possibly not 100% accurate)

If you do a do a mid-point subdivision of the curve, you can measure the (squared) distance (red) from the centre of the straight line (blue) joining the original end points to the mid point of your curve. If this exceeds a threshold (some number of pixels), recurse, else stop.

I seem to recall that the difference between the straight-line approx and the curve drops by a factor of 4 (or was it 8??) with each subdivision, so it converges quite rapidly.

The maths to subdivide the 4 control points of any Cubic Bezier into 2 smaller Beziers is quite simple .. but I'd need to go and look it up ;-)

Though, thinking about it, I'd say you might need to go one more step to account for these casesthis type of starting case: enter image description here

IIRC, Watt and Watt's "Advanced Animation and Rendering Techniques" (Chapter 3) has an interesting discussion on this (which I think is summarising the work of Clark https://dl.acm.org/doi/10.1145/965103.807440 ... but only the first page seems to be there :-( )

Failing that, you could try the following: Take the Cubic Bezier cage shown in green with curve in purple:

Bezier (Possibly not 100% accurate)

If you do a do a mid-point subdivision of the curve, you can measure the (squared) distance (red) from the centre of the straight line (blue) joining the original end points to the mid point of your curve. If this exceeds a threshold (some number of pixels), recurse, else stop.

I seem to recall that the difference between the straight-line approx and the curve drops by a factor of 4 (or was it 8??) with each subdivision, so it converges quite rapidly.

The maths to subdivide the 4 control points of any Cubic Bezier into 2 smaller Beziers is quite simple .. but I'd need to go and look it up ;-)

Though, thinking about it, I'd say you might need to go one more step to account for these cases: enter image description here

IIRC, Watt and Watt's "Advanced Animation and Rendering Techniques" (Chapter 3) has an interesting discussion on this (which I think is summarising the work of Clark https://dl.acm.org/doi/10.1145/965103.807440 ... but only the first page seems to be there :-( )

Failing that, you could try the following: Take the Cubic Bezier cage shown in green with curve in purple:

Bezier (Possibly not 100% accurate)

If you do a do a mid-point subdivision of the curve, you can measure the (squared) distance (red) from the centre of the straight line (blue) joining the original end points to the mid point of your curve. If this exceeds a threshold (some number of pixels), recurse, else stop.

I seem to recall that the difference between the straight-line approx and the curve drops by a factor of 4 (or was it 8??) with each subdivision, so it converges quite rapidly.

The maths to subdivide the 4 control points of any Cubic Bezier into 2 smaller Beziers is quite simple .. but I'd need to go and look it up ;-)

Though, thinking about it, I'd say you might need to go one more step to account for this type of starting case: enter image description here

Source Link
Simon F
  • 4.3k
  • 13
  • 30
Loading