Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!tut.cis.ohio-state.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!reading!rosemary!djd From: djd@rosemary.cs.reading.ac.uk (David Dawkins) Newsgroups: comp.windows.x Subject: Re: HELP: need to draw curve through points Message-ID: <1991Jan7.093756.15692@csug.rdg.ac.uk> Date: 7 Jan 91 09:37:56 GMT References: <340@coatimundi.cs.arizona.edu> Sender: news@csug.rdg.ac.uk Reply-To: djd@rosemary.cs.reading.ac.uk (David Dawkins) Organization: Comp. Sci. Dept., Reading Univ., UK. Lines: 33 In article <340@coatimundi.cs.arizona.edu> slm@cs.arizona.edu (Sandy Miller) writes: >I'm looking for an algorithm that will allow me to draw a smooth >curve through a set of points input by a user. The points may be >anywhere within a window (i.e. not limited to increasing x values). >Has anybody seen/done something like this? I would appreciate any >and all help. > >Thank you, >-sandy What you want are called 'splines'. These are methods for doing exactly what you require - in fact there are several algorithms, depending on what characteristics you require. (Perhaps) the most common is the Bezier curve. You should be able to find these algorithms in any good computer graphics book - two that spring to mind are 'Fundamentals of Interactive Computer Graphics', Foley & Van Dam, Addison Wesley ( Rather expensive - check your library first ) 'Interactive Computer Graphics', Burger & Gillies, Addison Wesley ( excellent book - well worth a look ) ISBN 0-201-17439-1 Hope this helps. If you still can't find the algorithm, email me and I will send you details. David. (PS: I am in no way connected with Addison Wesley, other than that I have read/used/enjoyed a good deal of their Computer Science books. ) djd@uk.ac.reading.cs.ksg djd%uk.ac.reading.cs.ksg@uk.ac.nsfnet-relay