Tag Archives: Cos

Draw a star with a given number of points in C#

My goal here was to draw a “normal” star where the interior concave angles were located at intersections of lines connecting the exterior convex points. This turned out to be a more interesting problem than I expected. There’s only one … Continue reading

Posted in algorithms, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , , | 2 Comments

Draw a non-intersecting star in C#

The following NonIntersectingStarPoints method generates the points needed to draw a non-intersecting star and returns them in an array. // Return PointFs to define a non-intersecting star. private PointF[] NonIntersectingStarPoints( int num_points, Rectangle bounds) { // Make room for the … Continue reading

Posted in drawing, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , , , | Leave a comment

Draw a star in C#

The following StarPoints method generates the points needed to draw a star and returns them in an array. // Return PointFs to define a star. private PointF[] StarPoints(int num_points, Rectangle bounds) { // Make room for the points. PointF[] pts … Continue reading

Posted in drawing, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , , | 1 Comment