Code sample Home

Create TIN object (Triangulated Irregular Network)
void DemoTinCreate (HANDLE hLcWnd)
{
  HANDLE hPt[5], hBlock;

  lcTIN_Clear();
  hPt[0] = lcTIN_AddPoint( 0, 0, 101 );
  hPt[1] = lcTIN_AddPoint( 50, -3, 102.1 );
  hPt[2] = lcTIN_AddPoint( 52, 48, 102.7 );
  hPt[3] = lcTIN_AddPoint( 2, 52, 103.5 );
  hPt[4] = lcTIN_AddPoint( 24, 23, 105 );
  lcTIN_AddTrian( hPt[0], hPt[3], hPt[4] );
  lcTIN_AddTrian( hPt[3], hPt[2], hPt[4] );
  lcTIN_AddTrian( hPt[2], hPt[1], hPt[4] );
  lcTIN_AddTrian( hPt[1], hPt[0], hPt[4] );
  lcPropPutFloat( 0, LC_PROP_TIN_ISOSTEP, 0.5 );
  lcPropPutInt( 0, LC_PROP_TIN_ISOBOLD, 2 ); 
  lcPropPutFloat( 0, LC_PROP_TIN_ISOBASE, 0.0 );
  lcTIN_Update();

  lcPropPutBool( 0, LC_PROP_TIN_VIEWISOH, true );
  lcPropPutBool( hLcWnd, LC_PROP_WND_TINEXT, true );
  hBlock = lcPropGetHandle( hLcWnd, LC_PROP_WND_VIEWBLOCK );
  lcBlockUpdate( hBlock, true, 0 );    // update extents 
  lcWndZoomRect( hLcWnd, 0,0,0,0 );    // zoom extents
}

This will create a drawing as shown on the picture below: