Chapter 6. Plotting Mathematical Expressions

In this chapter, we will create an application which will plot arbitrary mathematical expressions on a Windows Presentation Foundation (WPF)-based graphical surface. We will be using the GoF observer pattern for wiring expression input control and the rendering surface. In the process, we will develop a library which can evaluate arbitrary arithmetic expressions on the fly. The expression evaluator will support basic arithmetic operators (+, -, *, /, unary +/- ), trigonometric functions, and a pseudo variable ($t) which can represent the value of X-axis in a 2D Plane. During the course of this chapter, as a reader, you will learn the following:

  • The observer pattern
  • Parsing mathematical expressions using ...

Get .NET Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.