Code Monkey home page Code Monkey logo

mathplotter's Introduction

MathPlotter

A function plotter written in C++ with only OpenGl / ImGui / mathExp libraries

Guide to Use

Add to compiler options:
-DGLEW_STATIC -DNO_FREETYPE
Add to linker options:
-static-libgcc -lglew32 -lglfw3 -lopengl32 -lglu32 -lgdi32 -lwinmm

Or simply download the "Math.exe" file

Some Images from the App

alt text alt text alt text alt text alt text alt text alt text

mathplotter's People

Contributors

davdag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mathplotter's Issues

[Linux, Intel x86_64] RVar not defined in the sources but exists in Math.exe

Hello,

Thanks for your great idea, and sharing your code, much appreciated !

Since I'm using ImGui too, I'm trying to test it on Linux, and I think I'm very close ... except linking is no possible since RVar is undefined. Would you mind to define it or provide me some links to add / replace the missing definitions ? (tested with -std=c++11 to 17 without any success)

My g++ command line:

g++-8 -I/usr/local/include -I. -I./imgui -I./MathExpr/MathExpr -I./imgui/examples/libs/gl3w -DLinux -DIMGUI_UNLIMITED_FRAME_RATE -D_NO_DEBUG_HEAP=1 -Wall -std=c++17 -o build/imgui_math ./imgui/imgui.cpp ./imgui/imgui_demo.cpp ./imgui/imgui_draw.cpp ./imgui/imgui_widgets.cpp ./imgui/imgui_impl_glfw.cpp ./imgui/imgui_impl_opengl3.cpp ./imgui/examples/libs/gl3w/GL/gl3w.c ./main.cpp -lGL -lGLU   -L./MathExpr -lmathexpr

The errors:

./main.cpp:40:1: error: ‘RVar’ does not name a type; did you mean ‘char’?
 RVar *xvar;
 ^~~~
 char
./main.cpp:41:1: error: ‘RVar’ does not name a type; did you mean ‘char’?
 RVar* vararray[1];
 ^~~~
 char
./main.cpp:42:1: error: ‘ROperation’ does not name a type
 ROperation *op;
 ^~~~~~~~~~
./main.cpp: In function ‘double Func(double)’:
./main.cpp:138:6: error: ‘op’ was not declared in this scope
  y = op->Val();
      ^~
./main.cpp: In function ‘void ElaborateFunction()’:
./main.cpp:147:2: error: ‘xvar’ was not declared in this scope
  xvar = new RVar("x", &funx);
  ^~~~
./main.cpp:147:2: note: suggested alternative: ‘char’
  xvar = new RVar("x", &funx);
  ^~~~
  char
./main.cpp:147:13: error: expected type-specifier before ‘RVar’
  xvar = new RVar("x", &funx);
             ^~~~
./main.cpp:148:2: error: ‘vararray’ was not declared in this scope
  vararray[0] = xvar;
  ^~~~~~~~
./main.cpp:148:2: note: suggested alternative: ‘va_arg’
  vararray[0] = xvar;
  ^~~~~~~~
  va_arg
./main.cpp:149:2: error: ‘op’ was not declared in this scope
  op = new ROperation(function, 1, vararray);
  ^~
./main.cpp:149:11: error: expected type-specifier before ‘ROperation’
  op = new ROperation(function, 1, vararray);
           ^~~~~~~~~~


Thanks in advance :-)

FYI, RVar in Math.exe (using nm) reveals a lot of functions using RVar symbols.

nm Math.exe | grep RVar
000000000047ed83 T _Z11IsolateVarsRPciPP4RVariPP9RFunction
000000000047ef61 T _Z14IsolateNumbersRPciPP4RVariPP9RFunction
000000000047e967 T _Z5IsVarPKciiPP4RVar
0000000000480e48 T _ZeqRK4RVarS1_
000000000047f130 T _ZN10ROperationC1EPciPP4RVariPP9RFunction
000000000047caa4 T _ZN10ROperationC1ERK4RVar
000000000047f130 T _ZN10ROperationC2EPciPP4RVariPP9RFunction
000000000047caa4 T _ZN10ROperationC2ERK4RVar
000000000047bb70 T _ZN4RVarC1EPKcPd
000000000047bb24 T _ZN4RVarC1ERKS_
000000000047bb70 T _ZN4RVarC2EPKcPd
000000000047bb24 T _ZN4RVarC2ERKS_
000000000047bbac T _ZN4RVarD1Ev
000000000047bbac T _ZN4RVarD2Ev
000000000047c05c T _ZN9RFunctionC1ERK10ROperationiPP4RVar
000000000047bf94 T _ZN9RFunctionC1ERK10ROperationP4RVar
000000000047c05c T _ZN9RFunctionC2ERK10ROperationiPP4RVar
000000000047bf94 T _ZN9RFunctionC2ERK10ROperationP4RVar
0000000000481016 T _ZNK10ROperation10ContainVarERK4RVar
00000000004817e4 T _ZNK10ROperation10SubstituteERK4RVarRKS_
000000000048198a T _ZNK10ROperation4DiffERK4RVar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.