// Gnurbs - A curve and surface library
// Copyright (C) 2008-2026 Eric Bechet
//
// See the LICENSE file for contributions and license information.
// Please report all bugs and problems to <bechet@cadxfem.org>.
//

#include <iostream>
#include <vector>
#include <fstream>

#include "nvtkdisplay.h"
#include "nbspline.h"
#include "linear_algebra.h"

// function that computes a naca 4 digit profile - with a subseqent affine transformation (4x4 matrix)
void init_section(nbspline &section,unsigned int NACA4, double transfo[4][4],double error) 
{
  unsigned int digit1=NACA4%10; // 1st digit on the right, least significant
  unsigned int digit2=(NACA4/10)%10;
  unsigned int digit3=(NACA4/100)%10;
  unsigned int digit4=(NACA4/1000)%10;
  unsigned int remainder = NACA4/10000; // should be 0
  if (remainder==0)
  {
    // ...
  }
}

int main(void)
{
  data_container data;
  nvtkdisplay display;

  nbspline profile; // initial section of the profile
  double transfo[4][4]; // positionning matix (fill it by yourself

  nbspline profil;
  init_section(profil,1018,transfo,0.001); // geometrical relative error = max 0.001

  profile.Display(data);
  display.init_data(data);
  display.display();
  return 0;
}

