Check if array of verts are planar - Maxscript

Hi guys,
I need to check if an array of 3 or more verts are planar.
Anybody know of an easy way to do this in maxscript or should I start burning my eyeballs with this stuff?

I’m really stuck on this one, any help would be appreciated.

You could create edges between all the vertices and then use the cross product to calculate a face normal vector.


edgeVector1 = verts[1].pos - verts[2].pos
edgeVector2 = verts[1].pos - verts[3].pos
normalVector = normalize(cross(edgeVector1, edgeVector2))

If all these normal vectors point in the same direction (or the exact opposite direction, or have zero length), all verts should be in a plane.

Hi, I had written this script a while back but didn’t share it with the community. You can get it from http://dl.dropbox.com/u/3563584/Select_NPR.mzp

Installation Instructions

* Drag and Drop Select_NPR.mzp in to 3dsMax viewport.
* From the Customize User Interface menu option you can now assign Select_NPR to a Toolbar. The command is located in the "Akira Scripts" Category. 

If you find any bugs please notify me at akram2601(at)gmail.com

Wow,
Thanks for the help guys.
I’ll get to work right away.

These are mostly minor changes (Sceptered Flak is other wow gold contract to the Filling nerf), with one celebrity exception. Wait closely, you leave see it. I wrote a song nigh it. Hop into the line for the incoming Wintergrasp to get wow gold (symmetric in its new, less-crowded type), then go fix out in the curtilage and verbalise one up on every siege object clumped up against the paries there.