luckpp
May 26, 2009, 05:30 AM
Hello,
Given a set of 2D points (located on a 2D graph) I want to guess the spline cubic control points in order to draw a smoother 2D graph.
I will use a set of images in order to show you what I want to do:
Starting from 5 control points ( [0, 0], [25, 50], [50, 25], [75, 75], [100, 100] ) I was able to guess the intermediate points using Cubic Spline Interpolation. Below is the result:
Graph_OK (http://picasaweb.google.com/OrpheussGOD/Diagrams#5340108239482566050)
My problem is when I try to do the reverse operation, namely : starting from a set of 101 known 2D points ([x0, y0] [x1, y1], … [xk, yk], … [x99, y99], [x100, y100]) I want to guess some control points in order to draw a smoother graph than the one resulting from the initial 101 2D points.
In a rough form the graph may look like this:
Graph_NOK (http://picasaweb.google.com/OrpheussGOD/Diagrams#5340108238581848914)
But I want a smoother graph.
I would highly appreciate your help. Any hint on how should I guess the control points and draw a spline curve would be great.
Thank you very much and Best regards,
Lucian Andritoi.
Given a set of 2D points (located on a 2D graph) I want to guess the spline cubic control points in order to draw a smoother 2D graph.
I will use a set of images in order to show you what I want to do:
Starting from 5 control points ( [0, 0], [25, 50], [50, 25], [75, 75], [100, 100] ) I was able to guess the intermediate points using Cubic Spline Interpolation. Below is the result:
Graph_OK (http://picasaweb.google.com/OrpheussGOD/Diagrams#5340108239482566050)
My problem is when I try to do the reverse operation, namely : starting from a set of 101 known 2D points ([x0, y0] [x1, y1], … [xk, yk], … [x99, y99], [x100, y100]) I want to guess some control points in order to draw a smoother graph than the one resulting from the initial 101 2D points.
In a rough form the graph may look like this:
Graph_NOK (http://picasaweb.google.com/OrpheussGOD/Diagrams#5340108238581848914)
But I want a smoother graph.
I would highly appreciate your help. Any hint on how should I guess the control points and draw a spline curve would be great.
Thank you very much and Best regards,
Lucian Andritoi.