Imports System.Drawing Imports System.Drawing.Imaging Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim width As Integer = 600 Dim height As Integer = 600 Dim bmp As New Bitmap(width, height) Using g As Graphics = Graphics.FromImage(bmp) g.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias ' Background g.Clear(Color.Black) ' Center point Dim center As New Point(width \ 2, height \ 2) ' Radii Dim outerRadius As Integer = 250 Dim innerRadius As Integer = 120 ' === Draw outer circle === Dim outerRect As New Rectangle(center.X - outerRadius, center.Y - outerRadius, outerRadius * 2, outerRadius * 2) Dim penOuter As New Pen(Color.Lime, 6) g.DrawEllipse(penOuter, outerRect) ' === Draw inner circle === Dim innerRect As New Rectangle(center.X - innerRadius, center.Y - innerRadius, innerRadius * 2, innerRadius * 2) Dim penInner As New Pen(Color.Lime, 6) g.DrawEllipse(penInner, innerRect) ' === Draw segment divider lines === ' 8 colored segment divider lines For i As Integer = 0 To 7 Dim angle As Double = i * (Math.PI / 4) ' 45 degrees ' Pick a color for this segment Dim lineColor As Color Select Case i Mod 3 Case 0 : lineColor = Color.Yellow Case 1 : lineColor = Color.Pink Case 2 : lineColor = Color.DeepSkyBlue End Select Dim penDivider As New Pen(lineColor, 5) ' Start point at inner circle Dim x1 As Integer = center.X + innerRadius * Math.Cos(angle) Dim y1 As Integer = center.Y + innerRadius * Math.Sin(angle) ' End point at outer circle Dim x2 As Integer = center.X + outerRadius * Math.Cos(angle) Dim y2 As Integer = center.Y + outerRadius * Math.Sin(angle) g.DrawLine(penDivider, x1, y1, x2, y2) Next End Using Dim path As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\pineapple_ring_step6.bmp" bmp.Save(path, ImageFormat.Bmp) MessageBox.Show("Saved: " & path) End Sub End Class