# forum.alglib.net

ALGLIB forum
 It is currently Sun Jul 03, 2022 11:09 pm

 All times are UTC

### Forum rules

1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.

 Page 1 of 1 [ 1 post ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Fastest "curve over set of points" (no polynoms)Posted: Mon Jun 11, 2012 10:43 am

Joined: Mon Jun 11, 2012 9:56 am
Posts: 1
Hello!

Time to time, I'm working on "curve over set of points". And few days ago I found very easy and fast way to build a curve over points. Not sure that it's new one, but never seen it before. Of course, it can be another invention of bicycle. So, would be interesting to know: Is it something new or not?
Now algorithm. It works by generating two additional point on every segment in one pass. It processes corner by corner.

Attachment:

logic.jpg [ 31.61 KiB | Viewed 3420 times ]

Let see how it processes one corner with three points A B C.
1. Calculate location of additional point "e" located on segment [AB]. Distance from "B " to "e" is 1/3 of segment [AB] length.
2. Calculate location of additional point "f" located on segment [BC]. Distance from "B " to "f" is 1/3 of segment [BC] length.
3. Find a pseudo centroid point "D" of triangle [eBf]. At first time, I just use real centroid, but for best results it should be shifted.
4. Calculate distance and direction to shift "D" point to position of "B" point. Use calculated values to shift "e" and "f" , it produces "A1" and "C1" points.
5. "A1", "B" and "C1" points - is new points of curve.
Here is results (two passes)

Attachment:

demo.jpg [ 68.49 KiB | Viewed 3420 times ]

And with nodes
Attachment:

demo1.jpg [ 45.85 KiB | Viewed 3420 times ]

Best regards,
Igor Tyugay.

PS: there is no any problems to use same logic to work with 3D curves.

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 1 post ]

 All times are UTC

#### Who is online

Users browsing this forum: Bing [Bot] and 3 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for: