Hi, I have a question about converting mathematical equations to
graphics in the C programming language:
Let's say I want an image of a dragon, and I want to use mathematical
equations to represent this image. How would I convert the equations
to the image of the dragon in the C language?
The C language has no built-in ability to do graphics. However, there's
many graphics libraries to choose from that have a C interface. The hard
part is choosing the right one. You need to identify the specific kinds
of platforms you want to display your dragon on, and then someone will
probably be able to tell you the best one to use. I won't be able to
tell you; most of the graphics I produce are scientific data plots,
which generally require quite different capabilities than the kind of
image you're talking about.
However, that's relatively trivial. I think the really hard part of that
process is the one you skipped over: choosing equations to represent the
image. The most straight-forward way to display an image involves
retrieving the brightness of each pixel from a file (possibly in a
compressed format), and then writing that image data to the screen. Any
method that uses equations as an intermediate step in the process is
going to be conceptually much more complicated, unless you're talking
about only a small number of simple equations.
Did you mean "_a_ dragon" rather than "_the_ dragon" ? There might not
any real dragons in this world (though Komodo Dragons come close enough
for many purposes), but there's certainly a huge number of fictional
dragons to choose from. If you have a single particular one you want to
draw, you'll need to identify it more precisely than that.