manpagez: man pages & more
info mathgl_en
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.8 Interpolation

MGL scripts can use linear interpolation by subdata command, or spline interpolation by evaluate command. Also you can use resize for obtaining a data array with new sizes.

However, there are much special faster functions in other modes (C/C++/Fortran/Python/...).

Method on mglData: float Spline (float x, float y=0, float z=0) const
C function: float mgl_data_spline (HCDT dat, float x, float y, float z)

Interpolates data by cubic spline to the given point x in [0...nx-1], y in [0...ny-1], z in [0...nz-1].

Method on mglData: float Spline1 (float x, float y=0, float z=0) const

Interpolates data by cubic spline to the given point x, y, z which assumed to be normalized in range [0, 1].

Method on mglData: float Linear (float x, float y=0, float z=0) const
C function: float mgl_data_linear (HCDT dat, float x, float y, float z)

Interpolates data by linear function to the given point x in [0...nx-1], y in [0...ny-1], z in [0...nz-1].

Method on mglData: float Linear1 (float x, float y=0, float z=0) const

Interpolates data by linear function to the given point x, y, z which assumed to be normalized in range [0, 1].


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on April 13, 2012 using texi2html 5.0.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.