Snippet Category: VEX

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

VEX – Dictionaries

// // // //DICTIONARY int arr[] = {1,2,4}; dict elements; elements[‘lort’] = arr; if(isvalidindex(elements, ‘lort’) == 1) { int arra[] = elements[‘lort’]; i@lort = arra[2]; }

VEXercise1 – mark prims

//Mark all prims from the source groups with mirror=1 string grpName = ch("../inGrpName"); i@mirror = inprimgroup(0, grpName, @primnum);

VEX – Worley Noise

// // // //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;