# How to rotate and scale individual polygons in their local space with ICE?

228 views

### Alan Fregtman

Feb 7, 2012, 9:04:51 AM2/7/12
to Softimage Mailing List
Hey guys,

I'm having a hard time wrapping my head around affecting
self.PointPosition such that I can rotate and scale arbitrary polygons
as if I were working in Local mode.

I believe perhaps self.PolygonRefFrame would be the key but getting it
in the proper context is proving tricky so far.

Anyone done this before? Any tips?
Cheers,

-- Alan

### Milan Vasek

Feb 7, 2012, 9:10:52 AM2/7/12
to soft...@listproc.autodesk.com
you might check the compound from iamVFX on si-community

Milan Vasek
3d artist

### Alan Fregtman

Feb 7, 2012, 9:33:24 AM2/7/12
to soft...@listproc.autodesk.com
This is exactly what I needed. Thanks anyway! :)

(Why is it the solutions always appear the minute after one posts for help?)
--

### Christian Gotzinger

Feb 7, 2012, 10:08:37 AM2/7/12
to soft...@listproc.autodesk.com
I built something like this yesterday. However, I didn't use particles as I did all the transforms directly on the polygons. It's fairly simple actually:

SCALING:
Draw a vector from the vertex to its polygon. Multiply this vector by some scalar value and add the original point position to the result. Set the new point position.

ROTATION:
Draw a vector from the polygon to its vertices. Rotate the vector and add the original polygon position to the result. Set the new point position.

### César Sáez

Feb 7, 2012, 3:35:22 PM2/7/12
to soft...@listproc.autodesk.com
It's not so complicated and with the current ICE implementation you dont need particles at all.

Create an array with a matrix per polygon (using PolygonPosition and PolygonNormal), filter the matrices to their corresponding vertex (using a VertexToPolygon Array and the Select in Array node), multiply the pointposition by the inverse of that matrix, do the rotation (or whatever transformation you need), multiply again by the matrix itself and set pointposition.

Hope this help... and excuse my english :)
Regards
MatricesAndStuff.png