Draw an egg

It's very easy to draw an egg with the curve y^2=(x^2-1)*(x-π)
  1. Private Sub Form_Click()
  2. Me.Caption = "Draw an egg"
  3. Dim X As Double
  4. Me.Scale (-1.5, -3)-(1.5, 3)
  5. For X = -1 To 1 Step 0.0005
  6. Me.Circle (X, -Sqr((X ^ 2 - 1) * (X - 4 * Atn(1)))), 0.01, vbRed
  7. Me.Circle (X, Sqr((X ^ 2 - 1) * (X - 4 * Atn(1)))), 0.01, vbRed
  8. Next
  9. End Sub

It returns:

 

Draw an egg

你可能感兴趣的:(raw)