Mantis - tweak
Viewing Issue Advanced Details
1141 Any minor always 05-06-05 23:45 07-06-06 07:06
0001141: Blue handle rotation of a CPolygonPlayer causes it to shrink
Grab the blue handle of any CPolygonPlayer. Each time you move it, the polygon gets smaller. Eventually it disappears. Perhaps a roundoff error in the transform?

I'm assigning it to Andreas.
duplicate of 0000921new  Rotating a CPolygonPlayer resizes it, freezing the image 

07-06-06 07:06   
Other observations.

for this one:
get a polygon
open a viewer on it.
drag and drop "Polygon rotate 5" to create a script.
start it going.

(The polygon will drift away. When I tried it , it drifted to the top-right but I did not control the initial conditions. YMMV.) It went off the screen before I could verify if it was shrinking or not.

This has all to do with the insability of the reference point and the interdependence of the blue handle to the ref point and the "ref point" to the bounds of the poly.
The bounds change with rotation.

Philosophically a reference point should be like the pin you tack a note onto a bullitin board. The pins ref coords are fixed relative to the board.

The note only owns the hole the pin poked thru it.
The knots/vertices of the polygon have some relationship to the hole.

One good way to handle the size and orientation of a polygon is to use handles similar to a star.

There is a center handle and an outer handle.
The center handle stays fixed at the center of the polygon.
Moving the outer handle mantains the aspect of the shape of the polygon but allows it to both grow and/or turn.
The average of all the vertices is a good reference position to pick.
If you do not round this average then you can shrink the polygon quite small and still be able to grow it with its shape intact. (at some point running thru the center point needs to be guarded against because of the zero factor.)
Also the outer handle should always be choosen to be on one of the farthest vertices from the center/ref point. This will prevent the user from growing the polygon too large for memory.

Another way is when the blue handle starts a turn set a global ref position.
thats the pin.
During the turn reference the blue handle to the pin to determine turning angle.
At the end of the turn remove the pin. (else you get other problems)

Morphic halos and polygons cause problems also. So this is one that has not be implemented completely correctly anywhere yet.

Yours in service, -- Jerome Peace