What would be the basic of drawing a rainbow in c. I don't mean the colors but the shape.
What would be the basic of drawing a rainbow in c. I don't mean the colors but the shape.
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
Draw a circle (I don't know how yet) of thickness x and radius r. Then draw another circle around it with the same center and thickness, but with r += x.
PS: This just works in theory. I don't know much about x11.
You can draw several (or 7. i forgot how a rainbow looks like) concentric semi circles and fill them with the desired colors. There are library functions in TC for drawing a circle and filling any object with colors in the header <graphics.h>. I don't know about other IDEs.
HOPE YOU UNDERSTAND.......
By associating with wise people you will become wise yourself
It's fine to celebrate success but it is more important to heed the lessons of failure
We've got to put a lot of money into changing behavior
PC specifications- 512MB RAM, Windows XP sp3, 2.79 GHz pentium D.
IDE- Microsoft Visual Studio 2008 Express Edition
X11 is *nix. AFAIK there is no equivalent of a general purpose simple 2D graphics library (although some can surely be found). You either use X itself (I have no idea how hard that is but methinks it not easy) or go for the whole hog (unlit, untextured 2D stuff in openGL w/ "glut" is fairly simple, but as with any complex API you have to spend some hours coming to terms with it; there is no simple "draw_curve()" command you can just inject into a program).
As an added bonus, starting with openGL will get you that much closer to distracting the tish out of the mentally infirm -- I understand the gloves come off tomorrow...
Last edited by MK27; 05-09-2009 at 09:27 AM.
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
HOPE YOU UNDERSTAND.......
By associating with wise people you will become wise yourself
It's fine to celebrate success but it is more important to heed the lessons of failure
We've got to put a lot of money into changing behavior
PC specifications- 512MB RAM, Windows XP sp3, 2.79 GHz pentium D.
IDE- Microsoft Visual Studio 2008 Express Edition