-- shouldn't this:x = vert.x/1 - vert.zy = vert.y/1 - vert.z--be actuallyx = vert.x/(1 - vert.z)y = vert.y/(1 - vert.z) as divisions/mul come first in math, but the equation presented is different
Hi, I don't know exactly what's the purpose of this script, anyway I spotted a couple of issues x = vert.x/1 - vertz y = vert.y/1 - vertzshould be x = vert.x/1 - vert.z y = vert.y/1 - vert.z You may want to add a "with redraw off" context to speed things up and "with undo on" to reduce program granularity.
Good! For the sake of optimization if you plan to use it on large objects, you could store calculated positions x, y and z in an Array of Point3, then shift the whole vertexes in a single step with polyOp.moveVerts, it would be much faster. Something like: local iNumVerts = obj.getNumVertices() local ap3Shift = #()…
So I was trying to see if I can distort some geometry using some sort of equation using max script. Spherical projections would work for nearly every type of geometry so I tried using Stereographic Projection. And emulated the equation in max script. rollout projectRollout "Project"( button projectbtn "Project" on…
Thanks! I got it working. Also when it said 1-z it actually meant to invert it. Here is what I get now. But some of the meshes really mess up when it attempts to move a vertice to 30 different locations. Is there a way to split these vertices when this happens? Or a way to make each faces its own element?