To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 9974
9973  |  9975
Subject: 
Re: Ribbed hoses synth
Newsgroups: 
lugnet.cad, lugnet.cad.dev
Date: 
Fri, 24 Dec 2004 01:35:33 GMT
Viewed: 
1025 times
  
In lugnet.cad, Don Heyse wrote:

Hey I know a spiffy little recursive algorithm that'd probably do
a nice job of that.  I used to use it in 2D to reduce the size of
vectorized scanned image files, but it should extend nicely to 3D.

You start with the end points of a curve.  Then you find the farthest
point on the curve from the straight line between the ends.  Split
the line at that point if the distance is greater than your angular
tolerance.  Recursively apply this to the two new segments.

The distance is just the cross product divided by the length of the
line segment between the end points (the area of a parallelegram
divided by the base).

If you want to get fancy, you can check for a negative dot product,
which tells you a split point is past one of the ends of the line
segment.  Then you can use the radial distance instead of the
perpendicular distance.

Thanks, but I have a simple iterative solution that works well.

Kevin



Message is in Reply To:
  Re: Ribbed hoses synth
 
(...) Hey I know a spiffy little recursive algorithm that'd probably do a nice job of that. I used to use it in 2D to reduce the size of vectorized scanned image files, but it should extend nicely to 3D. You start with the end points of a curve. (...) (20 years ago, 19-Dec-04, to lugnet.cad, lugnet.cad.dev)

10 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR