mglib

Personal IDL library for M. Galloy

single page | use frames     summary     class     fields     routine details     file attributes

vis/geometry/

mg_bezier.pro


Returns the Bezier curve between points.

Examples

Try the main-level example program at the end of this file:

IDL> .run mg_bezier
This should produce:

Routines

Routines from mg_bezier.pro

result = mg_bezier_binomial(n)

Computes the binomial coefficients for a given degree.

result = mg_bezier(x, y [, z] [, n_points=long])

Returns the Bezier curve between points.

Routine details

top mg_bezier_binomial

result = mg_bezier_binomial(n)

Computes the binomial coefficients for a given degree.

Return value

fltarr(n + 1L)

Parameters

n in required type=long

degree of binomial coefficients, 0, 1, 2, ... n

top mg_bezier

result = mg_bezier(x, y [, z] [, n_points=long])

Returns the Bezier curve between points.

The returned Bezier curve will go through the first and last points, but the intermediate points only indicate shape and direction so the curve is not guaranteed to pass through them.

Return value

fltarr(2, npoints)

Parameters

x in required type=fltarr(n)

x-coordinates of control points

y in required type=fltarr(n)

y-coordinates of control points

z in optional type=fltarr(n)

z-coordinates of control points

Keywords

n_points in optional type=long default=20L

number of points

File attributes

Modification date: Wed May 14 15:07:15 2014
Lines: 39
Docformat: rst rst
Personal library of Michael Galloy
Contact me if you have enhancement requests or bug fixes.