View Full Version : Polygon manipulation

Mick Derevnin
10-28-2009, 03:07 AM
Hi everyone.

I've got a mini program that I'm trying to make as a side project, but I'm not sure how to store the data structures, or to achieve what i want.

I've used opengl before for a graphics course at university, so i know the basics, but not much more.

What i want to do, generally, is if i have an arbitrary polygon, like in figure 1, and i click and drag from the lower red cross, following the arrow to the upper red cross, i want it to turn out (as an example), like figure 2. One thing i want to do, is keep the area constant, so regardless of how you click and pull to skew the image, its area remains the same (or very similar).

I can't think of a way to do this using a typical polygon structure (of vertices/edges, and faces), nor do i know how to actually skew it like in the example.

If anyone knows of any libraries or articles i could read, or just have some advice on how i could do this, that would be awesome.



10-28-2009, 11:54 AM
Never did it myself, but I know at least one solution:

-tessellate your initial object
-skin it with some bones
-detect the bone to move on mouse drag

Ilian Dinev
10-28-2009, 12:57 PM
Every edge is a stiff spring.
The mesh is tesselated.

Mick Derevnin
10-28-2009, 06:30 PM
Thanks guys, those are good ideas!

If anyone else has some advice, that would be cool, but i should have enough to get it done.

If i have any more questions along the way, I'll be sure to ask.

Thanks again!