Socket
Book a DemoInstallSign in
Socket

@turf/bezier-spline

Package Overview
Dependencies
Maintainers
4
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/bezier-spline

turf bezier-spline module

5.1.5
Source
npmnpm
Version published
Weekly downloads
711K
5.24%
Maintainers
4
Weekly downloads
 
Created

What is @turf/bezier-spline?

@turf/bezier-spline is a module in the Turf.js library that allows you to create smooth Bezier spline curves from a set of points. This is particularly useful in geographic information systems (GIS) for creating smooth paths or routes on a map.

What are @turf/bezier-spline's main functionalities?

Create Bezier Spline from Points

This feature allows you to create a smooth Bezier spline curve from a set of points. The `resolution` option controls the number of points in the resulting spline, and `sharpness` controls the curvature.

const turf = require('@turf/turf');

const points = turf.lineString([
  [-75.343, 39.984],
  [-75.534, 39.123],
  [-75.123, 39.543],
  [-75.534, 39.123],
  [-75.343, 39.984]
]);

const options = { resolution: 10000, sharpness: 0.85 };
const bezierSpline = turf.bezierSpline(points, options);

console.log(JSON.stringify(bezierSpline));

Other packages similar to @turf/bezier-spline

Keywords

turf

FAQs

Package last updated on 10 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.