Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@turf/bezier-spline

Package Overview
Dependencies
Maintainers
9
Versions
29
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

  • 7.1.0-alpha.70
  • prerelease
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
800K
increased by5.18%
Maintainers
9
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

FAQs

Package last updated on 09 Aug 2024

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc