[vtkusers] How to get curved lines in vtkChartXY

madz madaramh at gmail.com
Fri Mar 7 03:44:53 EST 2014


Hi,
I found a way to do it,

	vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();

	for (int i = 0; i < size; i++){
		points->InsertNextPoint(Xvals[i],Yvals[i],0);//inset original point values
	}

	vtkSmartPointer<vtkParametricSpline> spline = 
		vtkSmartPointer<vtkParametricSpline>::New();
	spline->SetPoints(points);
	spline->ParameterizeByLengthOff();

	vtkSmartPointer<vtkParametricFunctionSource> functionSource = 
		vtkSmartPointer<vtkParametricFunctionSource>::New();
	functionSource->SetParametricFunction(spline);
	functionSource->SetScalarModeToNone();
	functionSource->GenerateTextureCoordinatesOff();
	functionSource->SetUResolution( 499 );
	functionSource->Update();



--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-get-curved-lines-in-vtkChartXY-tp5726199p5726223.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list