All Projects → chen0040 → Cpp Spline

chen0040 / Cpp Spline

Licence: mit
Package provides C++ implementation of spline interpolation

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Cpp Spline

Korma
Mathematics library focused on geometry for Multiplatform Kotlin 1.3
Stars: ✭ 65 (+20.37%)
Mutual labels:  interpolation, bezier
motionLib
quaternion, euler angle, interpolation, cubic bezier, cubic spline, PCA, etc.
Stars: ✭ 23 (-57.41%)
Mutual labels:  interpolation, bezier
Computational Geometry
Computational Geometry Unity library with implementations of intersection algorithms, triangulations like delaunay, voronoi diagrams, polygon clipping, bezier curves, ear clipping, convex hulls, mesh simplification, etc
Stars: ✭ 325 (+501.85%)
Mutual labels:  interpolation, bezier
Tweeny
A modern C++ tweening library
Stars: ✭ 485 (+798.15%)
Mutual labels:  interpolation
Flightanimator
Advanced Natural Motion Animations, Simple Blocks Based Syntax
Stars: ✭ 588 (+988.89%)
Mutual labels:  interpolation
Super Resolution cnn
Implementation of 'Image Super-Resolution using Deep Convolutional Network'
Stars: ✭ 27 (-50%)
Mutual labels:  interpolation
Metalresize
Fast image interpolation using Metal
Stars: ✭ 47 (-12.96%)
Mutual labels:  interpolation
Pykrige
Kriging Toolkit for Python
Stars: ✭ 415 (+668.52%)
Mutual labels:  interpolation
Scenekit Bezier Animations
Create animations over Bezier curves of any number of points
Stars: ✭ 35 (-35.19%)
Mutual labels:  bezier
Esmpy Tutorial
Basic tutorial for ESMPy Python package
Stars: ✭ 22 (-59.26%)
Mutual labels:  interpolation
Cglm
📽 Highly Optimized Graphics Math (glm) for C
Stars: ✭ 887 (+1542.59%)
Mutual labels:  bezier
Smile
Statistical Machine Intelligence & Learning Engine
Stars: ✭ 5,412 (+9922.22%)
Mutual labels:  interpolation
Wenoof
WENO interpolation Object Oriented Fortran library
Stars: ✭ 27 (-50%)
Mutual labels:  interpolation
Contourview
🦄 利用本库绘制出贝塞尔曲线魔炫背景。Customize view:Draw the magic dazzle background with Bézier.
Stars: ✭ 542 (+903.7%)
Mutual labels:  bezier
Beziercurve
Bezier curve master
Stars: ✭ 43 (-20.37%)
Mutual labels:  bezier
Interweave
🌀 React library to safely render HTML, filter attributes, autowrap text with matchers, render emoji characters, and much more.
Stars: ✭ 467 (+764.81%)
Mutual labels:  interpolation
Finterp
Multidimensional Linear Interpolation with Modern Fortran
Stars: ✭ 32 (-40.74%)
Mutual labels:  interpolation
Macsvg
macSVG - An open-source macOS app for designing HTML5 SVG (Scalable Vector Graphics) art and animation with a WebKit web view ➤➤➤
Stars: ✭ 789 (+1361.11%)
Mutual labels:  bezier
React Move
React Move | Beautiful, data-driven animations for React
Stars: ✭ 6,395 (+11742.59%)
Mutual labels:  interpolation
Moto.js
A light motion library with curvilinear support.
Stars: ✭ 24 (-55.56%)
Mutual labels:  bezier

cpp-spline

Package provides C++ implementation of spline interpolation

Features

  • Bezier Curve
  • B-Spline
  • CatmullRom

Usage

Bezier

To create a Bezier Curve in 2D or 3D environment:

#include <iostream>
#include "../../main/cpp/Bezier.h"
int main(char** argv, int argc) {
	Curve* curve = new Bezier();
	curve->set_steps(100); // generate 100 interpolate points between the last 4 way points

	curve->add_way_point(Vector(1, 1, 0));
	curve->add_way_point(Vector(2, 3, 0));
	curve->add_way_point(Vector(3, 2, 0));
	curve->add_way_point(Vector(4, 6, 0));
	...

	std::cout << "nodes: " << curve->node_count() << std::endl;
	std::cout << "total length: " << curve->total_length() << std::endl;
	for (int i = 0; i < curve->node_count(); ++i) {
		std::cout << "node #" << i << ": " << curve->node(i).toString() << " (length so far: " << curve->length_from_starting_point(i) << ")" << std::endl;
	}
	delete curve;
}

BSpline

To create a BSpline Curve in 2D or 3D environment:

#include <iostream>
#include "../../main/cpp/BSpline.h"
int main(char** argv, int argc) {
	Curve* curve = new BSpline();
	curve->set_steps(100); // generate 100 interpolate points between the last 4 way points

	curve->add_way_point(Vector(1, 1, 0));
	curve->add_way_point(Vector(2, 3, 0));
	curve->add_way_point(Vector(3, 2, 0));
	curve->add_way_point(Vector(4, 6, 0));
	...

	std::cout << "nodes: " << curve->node_count() << std::endl;
	std::cout << "total length: " << curve->total_length() << std::endl;
	for (int i = 0; i < curve->node_count(); ++i) {
		std::cout << "node #" << i << ": " << curve->node(i).toString() << " (length so far: " << curve->length_from_starting_point(i) << ")" << std::endl;
	}
	delete curve;
}

CatmullRom

To create a CatmullRom Curve in 2D or 3D environment:

#include <iostream>
#include "../../main/cpp/CatmullRom.h"
int main(char** argv, int argc) {
	Curve* curve = new CatmullRom();
	curve->set_steps(100); // generate 100 interpolate points between the last 4 way points

	curve->add_way_point(Vector(1, 1, 0));
	curve->add_way_point(Vector(2, 3, 0));
	curve->add_way_point(Vector(3, 2, 0));
	curve->add_way_point(Vector(4, 6, 0));
	...

	std::cout << "nodes: " << curve->node_count() << std::endl;
	std::cout << "total length: " << curve->total_length() << std::endl;
	for (int i = 0; i < curve->node_count(); ++i) {
		std::cout << "node #" << i << ": " << curve->node(i).toString() << " (length so far: " << curve->length_from_starting_point(i) << ")" << std::endl;
	}
	delete curve;
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].