Rotation of line in c Or c++
hello friends,
I have another problem that is how to rotate the line at 90 degree from the origin.
for example, i have a line x,y
__________________
x.......................... y
and now i want to rotate this line at 90 degree as shown bellow
90
|
|
|
|
|
|
|
|
X
rotation at 90 degree
Pls help me in solving this problem
I have another problem that is how to rotate the line at 90 degree from the origin.
for example, i have a line x,y
__________________
x.......................... y
and now i want to rotate this line at 90 degree as shown bellow
90
|
|
|
|
|
|
|
|
X
rotation at 90 degree
Pls help me in solving this problem
Replies
-
gaurav.bhorkarCan you post the code you've tried so far?
Here's my suggestion,
Fix one end of the line and then change the coordinates of the other end appropriately. -
optimystixwhat is the problem ? just substitute the corresponding values for 90 degree in the rotational transformation matrix and solve it.
where are u facing the problem ? share with us so that we can help. -
Manish GoyalTry bresenham algorithm
change the coordinates of line accordingly -
sumit_goelHello friends
first of all i would like to thanks to all for giving response to my problem. Actually i made a table fan in c++ and i want to rotate the fan. but for this first of all i should know how to rotate the line. then i can proceed to make rotation of fan.In the above problem i simply want to ask how to rotate the line at 90 degree.I am beginner of graphics programs in c++. and also Can anyone tell me from which site i can learn simple graphics programs in c++. -
Manish GoyalTry this program but i have not execute this .
It will draw a line
Now for rotating it change its co-ordinates accordingly
#include
#include #include void main(void) { int driver = DETECT,mode; int x=180,y=180; initgraph(&driver,&mode,"c:\\tc\\bgi"); for(;;) { line(360,360,x,y); } getch(); closegraph(); }
You are reading an archived discussion.
Related Posts
suggest me a successful project for my b.tech final year in mechanical engg.
Can any one sugget me how to get PPO??
i am a third year Comp.Sc Student:sshhh:
can any tell how to configure a wireless router of netgear?
i dont hav its password nor have its configuration cd
please do help me to create a secure wifi
Rolls-Royce Motor Cars has announced that new Bespoke Phantoms have arrived in Abu Dhabi. The cars are based on two different motifs which are inspired by the city’s rich culture...
hi..
i have to collect the information regarding the :"xnergy analysis of a thermodynamic system" which may be power plant, ic engine..etc. if u guys have any detailed idea, any...