?
hatte mal n programm geschrieben wo mir sin cos und tan gezeichnet wird.....is zwar glaub ich nicht die tollste art das zu machen, aber vieleicht hilfts ja
#include <conio.h>
#include <iostream.h>
#include <math.h>
#include <vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
#pragma argsused
int main(int argc, char* argv[])
{
float x=0;
float y_s=0, y_c=0, y_t=0;
int i;
HWND hWnd = FindWindow( "ConsoleWindowClass", NULL );
if( !hWnd )
return 1;
HDC hDC = GetDC( hWnd );
if( !hDC )
return 1;
clrscr();
for (i=30; i<700; i++)
{
SetPixel( hDC, i, 150, RGB( 255, 255, 255 ));
}
for (i=50; i<250; i++)
{
SetPixel( hDC, 30, i, RGB( 255, 255, 255 ));
}
for (x=0; x<=720; x=x+0.001)
{
y_s=sin(x*M_PI/180);
SetPixel( hDC, x+30, 150-(y_s*100), RGB( 255, 0, 0 ));
y_c=cos(x*M_PI/180);
SetPixel( hDC, x+30, 150-(y_c*100), RGB( 0, 0, 255 ));
y_t=tan(x*M_PI/180);
SetPixel( hDC, x+30, 150-(y_t*100), RGB( 0, 255, 0 ));
}