Draw Cosx with specific period width
问题 how can i draw a period of Cosx with width =100 and height 50? my recent code is very hard to control them :( // this to find y with each x to draw Cos for (int i = 0, j = 0; i < 50; i += 1, j++) { int y = (int)((Math.Cos((double)i * height/10F * Math.PI / cy) + 1.0) * (cx - 1) / widtd/10F); poi.SetValue(new Point(i, y),j); // poi is an aray of point } 回答1: Based on OP's last comment I assume "width" means a single period. Therefore to calculate the points of a cosine function with amplitude