Example #1
0
        public void Draw(Graphics g, ScreenConverter sc)
        {
            PointF     location = sc.IJ(Position);
            SolidBrush br       = new SolidBrush(Cl);

            g.FillEllipse(br, location.X, location.Y, sc.LengthR2Sx(2 * R), sc.LengthR2Sx(2 * R));
        }
Example #2
0
 public void DrawAll(Graphics g, ScreenConverter sc)
 {
     foreach (SpaceObj o in Space)
     {
         g.DrawEllipse(myPen, sc.II(o.Fulcrum.X - o.Orbit.A), sc.JJ(o.Fulcrum.Y + o.Orbit.B), sc.LengthR2Sx(o.Orbit.A * 2), sc.LengthR2Sy(o.Orbit.B * 2));
         o.Draw(g, sc);
     }
 }
Example #3
0
 public Main_Form()
 {
     InitializeComponent();
     sc    = new ScreenConverter(pictureBox.Width, pictureBox.Height);
     sun   = new Star("Солнце", 75, new Orbit(0, 0), new PointF(500, 250), 0.001, cl);
     space = new Universe();
     space.Space.Add(sun);
 }