javascript - how to convert contour data set with x/y/z to 3d object -
i have set of data x,y,z values of contour. kindly share ideas how make use draw in 3d world webgl( i'm using three.js).
if have list of xyz coordinates , want draw contour line, can use three.line
via this:
// cdata array of [xyz] e.g. [[x0,y0,z0],[x1,y1,z1],...] var g = new three.geometry(); (var i=0; i<cdata.length;i+=1) { g.vertices.push(new three.vector3(cdata[i][0], cdata[i][1], cdata[i][2])); } g.vertices.push(new three.vector3(cdata[0][0], cdata[0][1], cdata[0][2])); var contour = new three.line(g,new three.linebasicmaterial());
Comments
Post a Comment