I would like to draw a math function using DrawLine ().
This code use Pixel() displayed each 5° from 0 to 360°.
I post the code and output image in this topic.
dim yo(360),xo(360) as double
dim i as integer
dim yy, cfA,cfB,cfC,cfD,cfE as double
yy=(canvas1.Height/2) // to adjust X axe in half canvas.Haight
const deg2rad as double =0.017453292
cfA = 0.29
cfC = -0.47
cfE = -0.387
For i = 0 To 360 step 5
xo(i) = i+1 yo(i) =cfA + cfB * sin(i*deg2rad) + cfC * cos(i*Deg2rad) +cfD * sin(2*i*Deg2rad)+cfE * cos(2*i*Deg2rad) //Function to draw g.Pixel( xo(i)*1.45,yy-yo(i)*20)=color.Yellow // xo() and yo() are adjusted for the canvas (1.45,20) //I want to use DrawLine method to connect pixels from 0 to 360