mglib

Personal IDL library for M. Galloy

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

vis/geometry/

mg_spline.pro


Creates a 2-dimensional spline curve through the given x- and y-coordinates.

Examples

A spline curve through some points can easily be computed:

IDL> pts = mg_spline([1, 3, 5], [1, 5, 3])
To display this curve:
IDL> plot, findgen(11), /nodata, xstyle=9, ystyle=9 IDL> plots, pts
See the main-level program at the end of this file for a more involved example:
IDL> .run mg_spline

Other file information

Todo:

this should break down segments so that the x passed into SPL_INTERP is always monotonically increasing

Routines

top mg_spline

result = mg_spline(x, y [, n_points=long] [, _extra=keywords])

Creates a 2-dimensional spline curve through the given x- and y-coordinates.

Return value

fltarr(2, n) or dblarr(2, n)

Parameters

x in required type=numeric vector

x-coordinates of input points

y in required type=numeric vector

y-coordinates of input points

Keywords

n_points in optional type=long default=20L

number of points in output

_extra in optional type=keywords

keywords to SPLINE_P

File attributes

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