Draw an egg(2)

It'salso easy to draw an egg with the curve y^2=(sin(x)*(1+cos(x)/π)).
  1. PrivateSubForm_Click()
  2. Me.Caption="Drawanegg"
  3. DimpiAsSingle,XAsSingle
  4. pi=4*Atn(1)
  5. Me.Scale(-1,-2)-(4,2)
  6. ForX=0TopiStep0.0005
  7. Me.Circle(X,-Sqr(Sin(X)*(1+Cos(X)/pi))),0.01,vbWhite
  8. Me.Circle(X,Sqr(Sin(X)*(1+Cos(X)/pi))),0.01,vbWhite
  9. Next
  10. EndSub

It returns:

Draw an egg(2)

你可能感兴趣的:(raw)