Solved

# graphics programming

Posted on 2004-04-01
183 Views
i need the lines of code for the following algorithms.

flat fill
body fill
ellipse
morphing
scaling
rotation
translation
0
Question by:khansaquib
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2
• 2
• 2
• +2

LVL 30

Expert Comment

ID: 10738707
This is not a homework site.
0

LVL 2

Expert Comment

ID: 10738786
+ you did not give us much information on how to help you

what language ?
....
..
.
0

LVL 37

Expert Comment

ID: 10738924
Graphics Programming in .... ? (C/C++/VC++ or others)
0

Author Comment

ID: 10739093
c or c++
0

LVL 6

Expert Comment

ID: 10739189
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
0

LVL 6

Accepted Solution

mmusante earned 20 total points
ID: 10739207
for a more general approach to translation-scaling-rotation take a look here ...

http://www.engineeringsurveyor.com/transformations.htm
0

Author Comment

ID: 10915626
'Hi

Ive made the code in VB and its working well. Thanx for your help. I want this question to be closed.
0

LVL 30

Expert Comment

ID: 10947734
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.
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Progress
###### Suggested Courses
Course of the Month5 days, 3 hours left to enroll