khansaquib
asked on
graphics programming
i need the lines of code for the following algorithms.
flat fill
body fill
ellipse
morphing
scaling
rotation
translation
flat fill
body fill
ellipse
morphing
scaling
rotation
translation
This is not a homework site.
+ you did not give us much information on how to help you
what language ?
....
..
.
what language ?
....
..
.
Graphics Programming in .... ? (C/C++/VC++ or others)
ASKER
c or c++
Translation :
x1 = x + xt
y1 = y + yt
Scaling :
x1 = (x-x0)*fx + x0
y1 = (y-y0)*fy + y0
where (x,y) = original point
(x1,y1) = new point
(x0,y0) = scaling center point
fx, fy = scaling factors
xt, yt = translation offsets
x1 = x + xt
y1 = y + yt
Scaling :
x1 = (x-x0)*fx + x0
y1 = (y-y0)*fy + y0
where (x,y) = original point
(x1,y1) = new point
(x0,y0) = scaling center point
fx, fy = scaling factors
xt, yt = translation offsets
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
'Hi
Ive made the code in VB and its working well. Thanx for your help. I want this question to be closed.
Ive made the code in VB and its working well. Thanx for your help. I want this question to be closed.
You said that you want to do this in C/ C++. So the experts gave you help for that. Then you said that you did it in VB. That's not the correct thing to say, is it? You should've told us initially, that a VB solution was also fine with you.