Searching for symbolic math .NET component
-
I'm working on a behavioral animation project using C#, WinForms, CsGL and NewtonDynamics.NET. What remains is for me to do is find a .NET math component. Behavior of my critters is defined, in relation to other critters, by a mathematical function which returns a scalar value. This value is then used as a scale to determine the degree of force to apply to the critter, resulting in movement towards or away from the other critter. This is a simplification, but I hope you get the idea. The problem is that I'm currently defining these "behavioral functions" in code. Hence, I can't change a behavior of a critter unless I change the code and recompile. What I want is to be able to define or change these mathematical function at run-time. What I'm picturing is a a pop-up window where I can visually and symbolically define or modify a behavioral function at run-time. The function would be a standard math function, returning a double, and making use of basic numeric mathematical operators like: addition, subtraction, powers, roots, trigonometric functions, etc. I could invent a little visual, symbolic math language and write my own interpreter for it, but I'm sure this sort of thing has been done before. Does anyone know of a .NET component that could help me out with this sort of thing? Thanks.
-
I'm working on a behavioral animation project using C#, WinForms, CsGL and NewtonDynamics.NET. What remains is for me to do is find a .NET math component. Behavior of my critters is defined, in relation to other critters, by a mathematical function which returns a scalar value. This value is then used as a scale to determine the degree of force to apply to the critter, resulting in movement towards or away from the other critter. This is a simplification, but I hope you get the idea. The problem is that I'm currently defining these "behavioral functions" in code. Hence, I can't change a behavior of a critter unless I change the code and recompile. What I want is to be able to define or change these mathematical function at run-time. What I'm picturing is a a pop-up window where I can visually and symbolically define or modify a behavioral function at run-time. The function would be a standard math function, returning a double, and making use of basic numeric mathematical operators like: addition, subtraction, powers, roots, trigonometric functions, etc. I could invent a little visual, symbolic math language and write my own interpreter for it, but I'm sure this sort of thing has been done before. Does anyone know of a .NET component that could help me out with this sort of thing? Thanks.
Why not have a look at the latest version of Mathcad? www.mathcad.com[^]. If you're in education no doubt you can get it for a reasonable price. I used to provide tech support on this 10 years ago. It was a brilliant app then, so must be superb now. Mathcad also has a slick programming language built into the UI and you can also extend the set of worksheet functions via C/C++ if required. Mathcad behaves like a mathematical spreadsheet. Change an equation and it recalculates. Kevin
-
I'm working on a behavioral animation project using C#, WinForms, CsGL and NewtonDynamics.NET. What remains is for me to do is find a .NET math component. Behavior of my critters is defined, in relation to other critters, by a mathematical function which returns a scalar value. This value is then used as a scale to determine the degree of force to apply to the critter, resulting in movement towards or away from the other critter. This is a simplification, but I hope you get the idea. The problem is that I'm currently defining these "behavioral functions" in code. Hence, I can't change a behavior of a critter unless I change the code and recompile. What I want is to be able to define or change these mathematical function at run-time. What I'm picturing is a a pop-up window where I can visually and symbolically define or modify a behavioral function at run-time. The function would be a standard math function, returning a double, and making use of basic numeric mathematical operators like: addition, subtraction, powers, roots, trigonometric functions, etc. I could invent a little visual, symbolic math language and write my own interpreter for it, but I'm sure this sort of thing has been done before. Does anyone know of a .NET component that could help me out with this sort of thing? Thanks.
Check out some of the C# code compiler articles on CP. You can dynamically compile C# within your application and then call the generated assembly.
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
-
Check out some of the C# code compiler articles on CP. You can dynamically compile C# within your application and then call the generated assembly.
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon