Convert a control point curve to interpolation points (through points)?

 From:  bemfarmer
5247.3 In reply to 5247.2 
Preliminarily, I was thinking of something like this, based upon mouse input, with modifed SketchCurve.js :

(I'm sure my code is probably very messed up.) :-)

function DoFairCurve()
	var ui = moi.ui;
	var pointstreampicker = ui.createPointStreamPicker();
//Delete: var curvefactory = moi.command.createFactory( 'sketchcurve' );

//Delete: pointstreampicker.bind( curvefactory );
	while ( 1 )
		if ( !pointstreampicker.waitForEvent() )
		if ( pointstreampicker.event == 'finished' )
//Delete: curvefactory.commit();

	var numPts = pointstreampicker.numPoints;
	for ( var i=0; i < numPts; i++ )
		var point = pointstreampicker.getPoint[i];
	Save the points in array or something.
	Manipulate the points to make a "fair, high-quality" curve, with
	clothoids, etc. somehow, in javascript.
	Save the modified curve as a Nurbs control point curve.


Or the input curve could be a curve on the screen, created some way other than with mouse trace...