Important alert: (current site time 8/22/2014 5:33:11 AM EDT)
 

winzip icon

Simple Cubic Spline Curve Plot

Email
Submitted on: 9/15/2000 8:49:28 AM
By: Jason Bullen 
Level: Beginner
User Rating: By 9 Users
Compatibility: VB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0
Views: 12921
 
     This is an App to show how to create a Cubic Spline curve to match control points. I wanted to keep it mega simple and to the point, so the control points are hard coded.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 3 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

9/17/2000 10:39:26 PMNathan Chere

I wish I saw a point to this.
(If this comment was disrespectful, please report it.)

 
12/25/2000 7:52:12 AMAlmar Joling

Thank you! I've been searching for code like this for a *long* time, but ended up @ commercial products.

Thanks again! you get a 'excellent'

(If this comment was disrespectful, please report it.)

 
2/8/2001 7:02:57 AMKyle Shaw

This is a fantastic example of a spline. Thank you very much for this post.
(If this comment was disrespectful, please report it.)

 
12/20/2001 6:00:43 PMMark Hunter

This saved the day for me! I really wanted a way to do a spline without going to a commercial product, and this was *exactly* the ticket!

Thanks!
(If this comment was disrespectful, please report it.)

 
1/17/2004 6:18:16 PMRobert Redwood

I don't often leave feedback, but you deserve it for this. I looked so long for this code, and all I could find was hundreds and HUNDREDS of bezier programs. I am coding a menu that uses cubic interpolation, and I needed a source to verify a couple of parameters, and this is just the ticket. Small, simple, easy to understand, and best of all, WHAT I'M ACTUALLY LOOKING FOR!!! Thanks a lot, keep at it...
(If this comment was disrespectful, please report it.)

 
5/12/2007 12:17:01 PMTanner H

Fricking excellent. I needed this for designing a "Curves" dialog like Photoshop's, and I didn't want anything but raw cubic spline code. THIS WAS PERFECT! Thanks a million, dude.
(If this comment was disrespectful, please report it.)

 
6/14/2010 1:22:25 PMjeff

i ported this to javascript and found one small problem: the line where you set
p(nPoints) = 0#
should be above the for loop: "For i = nPoints - 1 To 2 Step -1"

it works in VB cuz by default array values are zero.
but, with that one small change, presto, works in javascript too. cool!
(If this comment was disrespectful, please report it.)

 
4/3/2013 1:01:32 PMsalama

thanks
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.