Programming Code Examples

How to create a moving car effect in C programming2 min read

In this article I am going to demonstrate how to create moving car effect in C.

C graphics using graphics.h functions or WinBGIM (Windows 7) can be used to draw different shapes, display text in different fonts, changecolors and many more. Using functions of graphics.h in turbo c compiler you can make graphics programs, animations, projects and games. You can draw circles, lines, rectangles, bars and many other geometrical figures. You can change their colors using the available functions and fill them. Following is a list of functions of graphics.h header file. Every function is discussed with the arguments it needs, its description, possible errors while using that function and a sample c graphics program.

Most of the functions are two dimensional except bar3d which draws a 3d bar, you can also implement these functions using already existing algorithms. You can also use these functions in C++ programs. You can use these functions for developing programs in Windows 7 and Vista using Dev C++ compiler. For that you need to download an additional package WinBGIm, download WinBGIm. Now open Dev C++ compiler go to tools->Package Manager, use install button and then browse the package location. Now create new project and select WinBGIm. This library also offers many functions which can be used for image manipulation, you can open image files, create bitmaps and print images, RGB colors and mouse handling.

We can even use the graphics for the OpenGL a faster buttery smooth library for the Graphical user Interface Based applications.

Take your time to share feedback on this article.

Add comment