005_ISurface

create NURBS surface

import processing.opengl.*;
import igeo.*;

size(960,720,IG.GL);

// 4 points in u direction, 3 points in v direction
double[][][] controlPoints = 
  {{{-30,-30, 10},{-30,  0,-20},{-30, 30,  0}},
   {{  0,-30,-10},{  0, 20,-50},{  0, 30,-20}}, 
   {{ 30,-30,-20},{ 30, 20, 60},{ 30, 30, 30}},
   {{ 60,-30,  0},{ 60,  0, 40},{ 60, 30, 30}}};

// u degree = 3, v degree = 2
new ISurface(controlPoints, 3, 2).clr(1,.8,0); // yellow