So, I am writing a graphing calculator. While I have a semi-functional graph, it’s hard for me to find a good balance between accurate graphs and smooth curves.
The current implementation (semi-pseudo-code) looks something like this:
for (float i = GraphXMin; i <= GraphXMax; i++)
{
PointF P = new PointF(i, EvaluateFunction(Function, i)
ListOfPoints.Add(P)
}
Graphics.DrawCurve(ListOfPoints)
The problem is that it only adds a point to each integer value, the graphs are ultimately distorted when their turning points do not fall into integers (for example, sin (x) ^ 2).

I tried to increase I by something smaller (for example 0.1), which works, but the graph looks very rough.

# GDI+. SmoothingMethod AntiAlias, , . - ? , , ?
, - , ? , - ? 1/ ^ 2
P.S. , - .