本文介绍了如何在C ++中绘制函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在C ++中创建函数图表。谁能帮助我开始?假设我想绘制函数y = x(它是通过点(0,0)(1,1)(2,2).....(20,20)的直线)等等)
我该怎么办呢? (如果你还建议如何绘制y& x轴,它是更好的)
对不起,但它不是在书上(好的文字建议是欢迎,顺便: - )C + +)是主要参考游戏图形。
唯一严重的引用我的问题,我能够找到是这样:
,这可能更容易学习和更大(和更强大的)。

  • 如果您能够输出一个文件并用另一个程序读取,最简单的方法是简单地写一个ASCII文件,是与(免费)。

    • If you want to do everything in C++, you will probably need an external library. OpenGL is a solution, there is also Qt, which is probably easier to learn and larger (and more powerful).
    • If you can afford to output a file and read it with another program, the easiest way is to simply write an ASCII file with the coordinates of the points and plot is with Octave (free).

    这篇关于如何在C ++中绘制函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

    08-03 23:53
    查看更多