recursion splitPoly
//global vector[] $all; global proc splitPoly(vector $tri[], int $depth, int $maxdepth) vector $v0 = $tri[0]; float $aveX = ($v0.x + $v1.x + $v2.x)/3; vector $v3 = <<$aveX, $aveY, $aveZ >>; if($depth < $maxdepth) //vector $tt[] = {pPlane1.vtx[4], pPlane1.vtx[0], pPlane1.vtx[1]};
|
You can use Poker face command to get the same effects
|
Image driven geometry layout
{ // __________ IMAGE MAPPING _________________________________ // insert the image path in the file node //DisplayShadedAndTextured; // Grab all our texture map samples $currU = $minU; |
|
Digital city, height controled by RGB { // __________ IMAGE MAPPING _________________________________ // insert the image path in the file node // assign the shader to an object //DisplayShadedAndTextured; // Grab all our texture map samples float $deltaU = ($maxU - $minU)/($nu - 1); // step size in u $currU = $minU; curve -d 1 -p $p[0] $p[1] $p[2] curve -d 3 -p $p[0] $p[1] $p[2] */ } //displaySmoothness -pw 3; } |
|
Some test renderings |
|
Extrude pattern After delete edges and remove floating vertex. Triangulate will generatet interesting patterns. |