home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / programm / 3362 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  1.1 KB

  1. Path: sparky!uunet!pipex!bnr.co.uk!uknet!mucs!p4.cs.man.ac.uk!lomasm
  2. From: lomasm@p4.cs.man.ac.uk (Martin Lomas)
  3. Newsgroups: comp.programming
  4. Subject: Re: Fillet mode?
  5. Message-ID: <lomasm.725153824@p4.cs.man.ac.uk>
  6. Date: 23 Dec 92 23:37:04 GMT
  7. References: <BzKv0M.1I3@geovision.gvc.com>
  8. Sender: news@cs.man.ac.uk
  9. Lines: 27
  10.  
  11. In <BzKv0M.1I3@geovision.gvc.com> pt@geovision.gvc.com (Paul Tomblin) writes:
  12.  
  13. >I'm trying to figure out the algorithm for this, but I thought I'd ask
  14. >first:
  15.  
  16. >Given: Corner points of a polyline, and a fillet radius
  17. >Generate: the parameters for the arcs at each corner point (ie. radius,
  18. >start point, end point, or 3 points that define the arc)
  19.  
  20.  
  21. Use PostScript! It already has such a function built in.
  22. I don't know what algorithm it uses.
  23.  
  24. But from simple maths -- consider:
  25.  
  26. Two lines A-B, B-C, with vertex B. You want to replace vertex B with
  27. an arc of radius r.
  28. Draw a circle of radius r tangental to A-B B-C, tangent points AB and
  29. BC respectively.
  30.  
  31. You know angle ABC, length r: Hence you can calculate the points AB and
  32. BC and any of the other lengths/angles/points you may wish. 
  33.  
  34. Sorry, non-too good with diagrams on ttys!
  35.  
  36. Regards,
  37. Martin.
  38.