I am looking for a simple implementation to calculate the control points of a B-spline for a given cubic (polynomial) spline. Geometrically speaking, we have to draw tangents to all knots and intersect two subsequent tangents to obtain the control points. Graphically speaking, this would required to draw the outside polygon for a given curve. By some method, the correct control points have to be found - as referred to in G5 commands by i,J, P and Q I assume. I am uncertain how to translate the polynomial coefficients to control points required for a B-spline definition. Fit of cubic splines to any curve shape is quite simple using e.g. My favorite tools for post-processing are GNU octave and Python. Start and end points (also called nodes) will give two constraints, two more follow from the continuity of the first and second derivatives. The 3rd order (cubic) splines are simply defined by four polynomial coefficients. The missing link: conversion of cubic polynomial coefficients to I,J,P, and Q. I would be interested in a rigorous definition of the parameters used in G5, namely what exactly is the definition of I, J, P, and Q ?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |