QuadraticBezierCurve - Verge3D User Manual - Soft8Soft
Description: Learn how to use QuadraticBezierCurve in your interactive 3D apps made with Verge3D

Curve →

# QuadraticBezierCurve

Create a smooth 2D quadratic Bezier curve, defined by a startpoint, endpoint, and a single control point.

## Code Example

`const curve = new v3d.QuadraticBezierCurve( new v3d.Vector2(-10, 0), new v3d.Vector2(20, 15), new v3d.Vector2(10, 0) ); const points = curve.getPoints(50); const geometry = new v3d.BufferGeometry().setFromPoints(points); const material = new v3d.LineBasicMaterial({ color: 0xff0000 }); // create the final object to add to the scene const curveObject = new v3d.Line(geometry, material); app.scene.add(curveObject);`

## Constructor

### QuadraticBezierCurve(v0 : Vector2, v1 : Vector2, v2 : Vector2)

- v0 – the startpoint.
- v1 – the control point.
- v2 – the endpoint.

## Properties

See the base Curve class for inherited properties.

### # .v0 : Vector2

The startpoint.

### # .v1 : Vector2

The control point.

### # .v2 : Vector2

The endpoint.

## Methods

See the base Curve class for inherited methods.

## Source

For more info on how to obtain the source code of this module see this page.