in graphics
what to do to rotate an object about a particular pt.
|
Go4Expert Member
|
|
| 3Dec2006,13:43 | #2 |
|
HI. What do you use to display your graphic? OpenGL?
You should give more information if you would like us to help you
|
|
Go4Expert Member
|
|
| 5Dec2006,17:54 | #3 |
|
ohh sure
i want to rotate it through c programmin usin putimage and getimage func i open it by using gmode ginit and gdriver |
|
Go4Expert Member
|
|
| 6Dec2006,07:58 | #4 |
|
sorry, in that matter i can not help you. i am only a bit familar with OpenGL.
good luck. |
|
Go4Expert Founder
|
![]() |
| 6Dec2006,11:01 | #5 |
|
You have to calculate left and top based on the rotation you want combining with the getimage is done from.
|
|
Go4Expert Member
|
|
| 23Dec2006,17:03 | #6 |
|
please explain in detail
|
|
Go4Expert Founder
|
![]() |
| 24Dec2006,00:06 | #7 |
|
The detail is that you need to perform some basic calculations.
|
|
Team Leader
|
![]() |
| 24Dec2006,02:09 | #8 |
|
As Shabbir says, this is pretty basic stuff. You can consider the line between the point of rotation and any given point (a pixel) as a vector. This vector can be expressed as an angle with respect to some coordinate system. To rotate it, one merely adds the angle of rotation. I suggest you review your trigonometry.
|
|
Go4Expert Member
|
|
| 24Dec2006,18:27 | #9 |
|
no i have already did that
even if i use getimage i get the image in the memory but i cannot rotate through putimage as it only use top left corner and not the right corner and even try to get the coordinates and put the image in new coordinates and do rotation like this i used write algo but program gets terminated automatically and c gets closed |
|
Team Leader
|
![]() |
| 24Dec2006,19:34 | #10 |
|
Quote:
|


