Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

7 Commits

Repository files navigation

XY PLOT ENGINE

Installation

git clone https://github.com/Bilodev/XYPlotEngine
cd XYPlotEngine
make && ./main.exe

Use

#include"Engine/Engine.h"

Define your functions and costants $\newline$

Note that the "NAN" is used as domain defintion, in this case the function "costant" is only defined for $x <20 \lor x > 30$

#defineM_PI 3.14159265358979323846
doublef(doublex) { returnx*x; }
doubleconstant(doublex){
if (20<x&&x<30) returnNAN;
return1;
}

Feed your functions to the engine

intmain()
{
interror;
engine_setname("My Loved Functions");
error=engine_feed_function("square", f);
if (error) {
printf("%s", engine_get_error());
return1;
}
engine_feed_point("P", 2, 2);
engine_feed_point("A", 3, 3);
engine_feed_point("Q", 2, -3);
engine_feed_function("exp", exp);
engine_draw();
return0;
}

Result

Result

More

  • The user can toggle the visibility of the functions by clicking on their name.
  • The user can specify x and y coordinates to see the function in specific points.
  • The user can move the graph using the arrow keys.
  • The maximum functions and points the user can feed is set to 5 each.

Moved Result

About

Plot user defined functions and points

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages