Answer the question
In order to leave comments, you need to log in
How to draw a graph of a function in c++?
I work in Borland C++ builder (yes, good old Borland). It is necessary to plot a function graph with a line on some part of the form. How to get the coordinates of the points of the graph, I have already thought up and almost implemented, the problem is how to actually display this graph on the screen if, for example, the coordinates of the points are known? On what to draw and what functions?
It would be really nice if this graph could still be moved and scaled to view different parts of it, but that's probably another story...
Answer the question
In order to leave comments, you need to log in
You can use OpenGL. In particular, the primitive GL_LINES for lines or GL_LINES_STRIP for polylines.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question