Skip to content

New Plot Type: Circle #2413

@bukkideme

Description

@bukkideme

Maybe i just miss something trivial, but I tried this:

const double r = 300;
var func1 = new Func<double, double?>((x) => Math.Sqrt(Math.Pow(r, 2) - Math.Pow(x, 2)));
var func2 = new Func<double, double?>((x) => -Math.Sqrt(Math.Pow(r, 2) - Math.Pow(x, 2)));

formsPlot1.Plot.Clear();

// Add functions to the plot
formsPlot1.Plot.AddFunction(func1, lineWidth: 3, color: Color.Blue);
formsPlot1.Plot.AddFunction(func2, lineWidth: 3, color: Color.Blue);

// Manually set axis limits because functions do not have discrete data points
formsPlot1.Plot.SetAxisLimits(-300, 300, -300, 300);
               
formsPlot1.Plot.Render();
formsPlot1.Refresh();

then i get this:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedScott won't do this soon, but PRs from the community are welcome!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions