Click here to Skip to main content
15,669,603 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
What is the C programming code that draws the curve passing closest to the given N point? (note: B-spline curve to be drawn)

What I have tried:

I don't understand what is the B-spline curving.
Updated 10-Nov-20 5:35am

I don't understand what is the B-spline curving.
The start with its very Wikipedia page: B-spline - Wikipedia[^].
Share this answer
What is the C programming code that draws ...

We are more than willing to help those that are stuck: but that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.

If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^]
Share this answer
First figure out how to draw points. Then you should be able to extend that to drawing lines. Then you can use standard math to compute the points of the spline and draw them as points or draw lines to connect them. The key is to do this one step at a time so you understand what's going on. If someone just hands you a pile of code you are not likely to understand anything.

This page has useful information about Bezier spline surfaces and curves : Bezier Surface[^]. Note there are other types of splines besides Bezier.
Share this answer
Member 14988712 10-Nov-20 11:59am    
Thank you for your help. The curve you sent is the Bezier Spline. What I'm looking for is the B-Spline curve. Actually, I'm not looking for a ready-made code. Mathematically, I couldn't quite figure out how the B-Spline curve was expressed.
Rick York 10-Nov-20 23:55pm    
I don't see the same coverage of B-Splines at Paul's site. I did a search for "B spline tutorial" at google and a lot of results came up. You should try it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900