Exemplo n.º 1
0
    /// <summary>
    /// Show a design for a new chrysanthemum shell.
    /// </summary>
    public static void Main()
    {
        Frapper theta  = new Arithmetic('*', new T(), new Constant(2 * Math.PI));
        Frapper theta2 = new Arithmetic('*', new T(), new Constant(2 * Math.PI * 5));
        Frapper x      = new Arithmetic('+', new Cos(theta), new Cos(theta2));
        Frapper y      = new Arithmetic('+', new Sin(theta), new Sin(theta2));

        PlotPanel2 p = new PlotPanel2(300, x, y);
        Form       f = new Form();

        f.DockPadding.All = 10;
        f.Text            = "Chrysanthemum";
        f.Controls.Add(p);
        Application.Run(f);
    }
Exemplo n.º 2
0
    /// <summary>
    /// The main entry point to the application.
    /// </summary>
    public static void Main()
    {
        Frapper brightness =
            new Arithmetic(
                '*',
                new Exp(
                    new Arithmetic(
                        '*', new Constant(-4), new T())),
                new Sin(
                    new Arithmetic(
                        '*', new Constant(Math.PI), new T())));

        PlotPanel2 p  = new PlotPanel2(100, new T(), brightness);
        Panel      p2 = UI.NORMAL.CreatePaddedPanel(p);
        GroupBox   gb = UI.NORMAL.CreateGroupBox("Brightness vs. Total Burn Time", p2);

        gb.Font = UI.NORMAL.Font;
        Form f = new Form();

        f.DockPadding.All = 10;
        f.Text            = "Brightness";
        f.Controls.Add(gb);
        Application.Run(f);
    }