Subscribed unsubscribe Subscribe Subscribe

004_ISurface

create surface

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

/*
create surface from 3 or 4 corner points
*/

size(960,720,IG.GL);

new ISurface(0,0,0,40,40,40,80,0,0,40,-40,40).clr(1.0,0.8); // white

// 3 corner points (triangle)
new ISurface(-50,40,0,-10,40,0,-50,0,0).clr(0.5,0,0); // red

// rectangle
new ISurface(-50,-10,0,-10,-10,0,-10,-40,0,-50,-40,0).clr(0,0,1.0); // blue