Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How to draw vectors with C language programming?

Can someone please tell me how to write a program in C language or C++ to draw this diagram? I will then use a vector drawing software program to complete it, but to get this diagram, I have to first need to write out the program. Can someone help me?

Attachment image

1 Answer

Relevance
  • 7 years ago
    Favorite Answer

    You need more than just C or C++ to draw that or anything else.

    You need access to a graphics library and a windowing system, normally provided by your supporting OS.

    You can use OpenGL which is written in C, or DirectX for Windows.

    On a Mac you can rely on the Cocoa graphics library and do it in Objective C.

    In any case, it is not a simple task to describe on a forum like this.

    You can create the multicolored grad as a bitmap image directly in C without a graphics library, but the numbers and labels are problematic.

    Your question is strange. If you are going to use a vector drawing program to make the diagram, why do you need to program it yourself?

Still have questions? Get your answers by asking now.