Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!sun-barr!ames!sgi!robert@randu.sgi.com From: robert@randu.sgi.com (Robert Skinner) Newsgroups: comp.graphics Subject: Re: Bezier curves Summary: Its Easy... Message-ID: <41650@sgi.sgi.com> Date: 12 Sep 89 21:40:00 GMT References: <273@marvin.moncam.co.uk> <8358@spool.cs.wisc.edu> Sender: robert@randu.sgi.com Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 32 In article <8358@spool.cs.wisc.edu>, stuart@rennet.cs.wisc.edu (Stuart Friedberg) writes: > kaush@moncam.co.uk (Kaush Kotak) writes: > >Help! I need info on how to split a single (cubic) bezier curve into two. > >Given a t-value & 4 control points, how do I find values for the new control > >points? > > There is probably a more direct method, but .... [ description deleted ] There is a very simple way to do this from a construction you probably already know. To find a point at t=t0 along a Bezier with the control points A, B, C, and D. find the points t0 of the way from A to B, B to C and C to D: (You should draw a picture to follow along.) E = A + t0*(B - A) F = B + t0*(C - B) G = C + t0*(D - C) repeat with the two segments you get: H = E + t0*(F - E) I = F + t0*(G - F) and repeat again with the last segment: J = H + t0*(I - H) You know J is on the curve, and it turns out that (A, E, H, J) and (J, I, G, D) are the control points for your two curves. Robert