How to draw a graph of the function y=actg(bx+c) with respect to the three variables in VS ?

  • Visual Studio is an IDE please specify language - sysashi
  • It seems to be C ++ - Bogdan17
  • you need to search for libraries for building graphs in c ++ or look at this dislin.de - sysashi
  • Is ZedGraph suitable? - Bogdan17

1 answer 1

Here is an example. I put the example below. It remains only to understand and do a certain function.

 #include <Windows.h> #include <stdlib.h> #include <math.h> int main(void) { float x; HDC hDC = GetDC(GetConsoleWindow()); HPEN Pen = CreatePen( PS_SOLID, 2, RGB(255, 255, 255)); SelectObject( hDC, Pen ); MoveToEx( hDC, 0, 85, NULL ); LineTo( hDC, 200, 85 ); MoveToEx( hDC, 100, 0, NULL ); LineTo( hDC, 100, 170 ); for (x = -8.0f; x <= 8.0f; x += 0.01f ) // O(100,85) - center { MoveToEx( hDC, 10*x+100, -10*sin(x)+85, NULL );//10 - scale LineTo( hDC, 10*x+100, -10*sin(x)+85 ); } system("pause"); return 0; }