{"id":23080619,"url":"https://github.com/chen0040/cpp-spline","last_synced_at":"2025-07-08T03:37:25.535Z","repository":{"id":47799896,"uuid":"92795476","full_name":"chen0040/cpp-spline","owner":"chen0040","description":"Package provides C++ implementation of spline interpolation","archived":false,"fork":false,"pushed_at":"2021-07-16T18:10:43.000Z","size":16,"stargazers_count":136,"open_issues_count":4,"forks_count":43,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-03T23:51:12.483Z","etag":null,"topics":["b-spline","bezier","catmull-rom","cpp","interpolation","splines"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chen0040.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-30T03:41:08.000Z","updated_at":"2025-02-21T11:10:41.000Z","dependencies_parsed_at":"2022-08-30T09:00:51.738Z","dependency_job_id":null,"html_url":"https://github.com/chen0040/cpp-spline","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chen0040/cpp-spline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen0040%2Fcpp-spline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen0040%2Fcpp-spline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen0040%2Fcpp-spline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen0040%2Fcpp-spline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chen0040","download_url":"https://codeload.github.com/chen0040/cpp-spline/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen0040%2Fcpp-spline/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264190920,"owners_count":23570601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["b-spline","bezier","catmull-rom","cpp","interpolation","splines"],"created_at":"2024-12-16T13:15:45.658Z","updated_at":"2025-07-08T03:37:25.493Z","avatar_url":"https://github.com/chen0040.png","language":"C++","readme":"# cpp-spline\n\nPackage provides C++ implementation of spline interpolation\n\n# Features\n\n* Bezier Curve\n* B-Spline\n* CatmullRom\n\n# Usage\n\n# Bezier \n\nTo create a Bezier Curve in 2D or 3D environment:\n\n```cpp\n#include \u003ciostream\u003e\n#include \"../../main/cpp/Bezier.h\"\nint main(char** argv, int argc) {\n\tCurve* curve = new Bezier();\n\tcurve-\u003eset_steps(100); // generate 100 interpolate points between the last 4 way points\n\n\tcurve-\u003eadd_way_point(Vector(1, 1, 0));\n\tcurve-\u003eadd_way_point(Vector(2, 3, 0));\n\tcurve-\u003eadd_way_point(Vector(3, 2, 0));\n\tcurve-\u003eadd_way_point(Vector(4, 6, 0));\n\t...\n\n\tstd::cout \u003c\u003c \"nodes: \" \u003c\u003c curve-\u003enode_count() \u003c\u003c std::endl;\n\tstd::cout \u003c\u003c \"total length: \" \u003c\u003c curve-\u003etotal_length() \u003c\u003c std::endl;\n\tfor (int i = 0; i \u003c curve-\u003enode_count(); ++i) {\n\t\tstd::cout \u003c\u003c \"node #\" \u003c\u003c i \u003c\u003c \": \" \u003c\u003c curve-\u003enode(i).toString() \u003c\u003c \" (length so far: \" \u003c\u003c curve-\u003elength_from_starting_point(i) \u003c\u003c \")\" \u003c\u003c std::endl;\n\t}\n\tdelete curve;\n}\n```\n\n# BSpline \n\nTo create a BSpline Curve in 2D or 3D environment:\n\n```cpp\n#include \u003ciostream\u003e\n#include \"../../main/cpp/BSpline.h\"\nint main(char** argv, int argc) {\n\tCurve* curve = new BSpline();\n\tcurve-\u003eset_steps(100); // generate 100 interpolate points between the last 4 way points\n\n\tcurve-\u003eadd_way_point(Vector(1, 1, 0));\n\tcurve-\u003eadd_way_point(Vector(2, 3, 0));\n\tcurve-\u003eadd_way_point(Vector(3, 2, 0));\n\tcurve-\u003eadd_way_point(Vector(4, 6, 0));\n\t...\n\n\tstd::cout \u003c\u003c \"nodes: \" \u003c\u003c curve-\u003enode_count() \u003c\u003c std::endl;\n\tstd::cout \u003c\u003c \"total length: \" \u003c\u003c curve-\u003etotal_length() \u003c\u003c std::endl;\n\tfor (int i = 0; i \u003c curve-\u003enode_count(); ++i) {\n\t\tstd::cout \u003c\u003c \"node #\" \u003c\u003c i \u003c\u003c \": \" \u003c\u003c curve-\u003enode(i).toString() \u003c\u003c \" (length so far: \" \u003c\u003c curve-\u003elength_from_starting_point(i) \u003c\u003c \")\" \u003c\u003c std::endl;\n\t}\n\tdelete curve;\n}\n```\n\n# CatmullRom \n\nTo create a CatmullRom Curve in 2D or 3D environment:\n\n```cpp\n#include \u003ciostream\u003e\n#include \"../../main/cpp/CatmullRom.h\"\nint main(char** argv, int argc) {\n\tCurve* curve = new CatmullRom();\n\tcurve-\u003eset_steps(100); // generate 100 interpolate points between the last 4 way points\n\n\tcurve-\u003eadd_way_point(Vector(1, 1, 0));\n\tcurve-\u003eadd_way_point(Vector(2, 3, 0));\n\tcurve-\u003eadd_way_point(Vector(3, 2, 0));\n\tcurve-\u003eadd_way_point(Vector(4, 6, 0));\n\t...\n\n\tstd::cout \u003c\u003c \"nodes: \" \u003c\u003c curve-\u003enode_count() \u003c\u003c std::endl;\n\tstd::cout \u003c\u003c \"total length: \" \u003c\u003c curve-\u003etotal_length() \u003c\u003c std::endl;\n\tfor (int i = 0; i \u003c curve-\u003enode_count(); ++i) {\n\t\tstd::cout \u003c\u003c \"node #\" \u003c\u003c i \u003c\u003c \": \" \u003c\u003c curve-\u003enode(i).toString() \u003c\u003c \" (length so far: \" \u003c\u003c curve-\u003elength_from_starting_point(i) \u003c\u003c \")\" \u003c\u003c std::endl;\n\t}\n\tdelete curve;\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchen0040%2Fcpp-spline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchen0040%2Fcpp-spline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchen0040%2Fcpp-spline/lists"}