VEX Types
// // // // VEX types float f@name vector2 (2 floats) u@name vector (3 floats) v@name vector4 (4 floats) p@name int i@name matrix2 (2×2 floats) 2@name matrix3 (3×3 floats) 3@name
Technical Art & Games
// // // // VEX types float f@name vector2 (2 floats) u@name vector (3 floats) v@name vector4 (4 floats) p@name int i@name matrix2 (2×2 floats) 2@name matrix3 (3×3 floats) 3@name
// // // //DICTIONARY int arr[] = {1,2,4}; dict elements; elements[‘lort’] = arr; if(isvalidindex(elements, ‘lort’) == 1) { int arra[] = elements[‘lort’]; i@lort = arra[2]; }
int f = 1; if (ch(‘../dispMirror’) == 1) f = -1; //DISPLACE POINTS vector a; if (@ptnum == 0) { a = normalize(point(0, "P", @ptnum+1) – point(0, "P", @ptnum)); }
//loopp through verts and break up the shit if(ch(‘../limitVerts’) == 1) { int numVerts = primvertexcount(0, @primnum); if(numVerts > 2) { for(int i = 2; i<numVerts; i++) { //store vertex
//break the primitives into shorter lines //each prim will only contain 2 vertices (option) limitVerts for (int i = 0; i<@numprim; i++) { int numVerticies = primvertexcount(0, i); int vtxPrim
//put mirrored prims into a new group (name from string parameter) string grpName = ch("../outGrpName"); int val; if(grpName != "") { val = i@mirror – prim(1, "mirror", @primnum); } else
//Mark all prims from the source groups with mirror=1 string grpName = ch("../inGrpName"); i@mirror = inprimgroup(0, grpName, @primnum);
// // // //Worley Noise float dist1,dist2; float freq = 8; vector offset = set(0,0,0); int seed = 666; wnoise(@P * freq+offset, seed, dist1, dist2); @Cd = dist1;
// // // //Build-in Attributes //Point int pointNumber = @ptnum; int numberOfPoints = @numpt; vector pos0 = point(0, "P", @ptnum); //get attribute setpointattrib(0, "P", @ptnum, set(0,0,0), "set"); // set attribute
// // // //Rotate Points in XZ-Plane vector rotAxis = set(0,1,0); // Set rotation axis to Y (we’re working on ‘2D’ here) vector X = (@P-point(0, "P", @ptnum+1)) * {1,0,1};