cvdlab/plasm.js — pull request #26 by furio (2012-06-06 14:39:38+00:00)
Title: PROFILEPROD_SURFACE patch

PROFILEPROD_SURFACE patch by Furiani & Menichetti

var dom1D = INTERVALS(1)(32);
var Su0 = BEZIER(S0)([[0,0,0],[2,0,0],[0,0,4],[1,0,5]]);
var curve0 = MAP(Su0)(dom1D);
DRAW(COLOR([0,0,1])(curve0));

var Su1 = BEZIER(S1)([[0,0,0],[3,-0.5,0],[3,3.5,0],[0,3,0]]);
var Su1Draw = BEZIER(S0)([[0,0,0],[3,-0.5,0],[3,3.5,0],[0,3,0]]);
var curve1 = MAP(Su1Draw)(dom1D);
DRAW(COLOR([1,0,1])(curve1));

var dom2D = PROD1x1([INTERVALS(1)(16),INTERVALS(1)(16)]); // DOMAIN([[0,1],[0,1]])([20,20]);
var out = MAP(PROFILEPROD_SURFACE([Su0,Su1]))(dom2D);
DRAW(out);