#include #include extern "C" MATHEXPORT void MATHCALL MathEntry( int iCommandCode, BOOL bInit, MathEntryParam *pMathEntry ) { MathEnv *pEnv = pMathEntry->GetMathEnv() ; pEnv->ConsoleWrite( "Hello world.\n" ) ; pEnv->InitGraphics( MATHRGB(0,0,0), MATHRGB(0,255,0) ) ; GraphicsSetup gs ; pEnv->GetDimensions( &gs ) ; int width, height ; pEnv->GetPixelDimensions( &width, &height ) ; double xres = (gs.xMax-gs.xMin)/width ; for( double x=gs.xMin ; xSetPoint( x, sin(x) ) ; } }