Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Does anybody have any idea about how to map a square image into a circle in visual c++?

basicaly i want to transform whole image

supose there is control point on midddle top edge of image when i moves that control point upward my upper part of image should transform in circular upward direction. and if i moves downward then vice versa!!!!!!

i think its lke cylindrical mapping........
Posted
Updated 8-Nov-11 20:14pm
v3
Comments
Andrew Brock 9-Nov-11 1:57am    
Be more specific. Are you trying to draw a circle region of a square image to the screen, or are you trying to do a 3D projection to make the square image look like it is a sphere, such as a map of the earth projected into a sphere?
Sergey Alexandrovich Kryukov 9-Nov-11 2:17am    
What mapping do you need, exactly?
--SA
pranav_30 9-Nov-11 2:19am    
cylindical mapping as well spherical mapping
pranav_30 9-Nov-11 3:08am    
plz let me nknow cylindrical mappinng in visual c
++

 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 9-Nov-11 2:20am    
A note for those who was trying to take this seriously: a computer is not a compass with a straightedge. :-)
--SA
pranav_30 9-Nov-11 2:25am    
u r not getting i want mapping function for square image to cylindrical and sphericxal
A sphere or cylinder is usually represented as a mesh. To map a square texture to it, you would associate the 3D coordinates of the points of each element in the mesh, with a 2D coordinate in the texture.

There are many ways to create this mapping. Others have provided you with good information on how to do this.

This is an advanced topic, so don't expect a simple answer.
 
Share this answer
 
Comments
pranav_30 10-Nov-11 0:19am    
ok could u provide me any ref abt this mesh mappng
JackDingler 10-Nov-11 8:41am    
Several people have already done so.

Here's another.
http://www.opengl.org/code/

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900