Creating a language... (for a graphing calculator)

Hi all!

I have been making a graphing calculator and have come to a point where it

works, but I am trying to decide what limits and features it should have.

Currently, it graphs all equations in 3D space. To graph an equation, all

the user has to do is type it in:

x = y^2+z^2

z=cos(z)+cos(y)

However, I feel this simple syntax is too limiting.

*With it, how should the user specify the values to substitute for y, z, or

x? I don't really like the idea of using a dialogue box interface to set up

such dynamic parameters. At the moment, all variables are substituted with a

number ranging from -5 to 5. The numbers are incremented in one big loop by

a value of 0.5 . In return, the graph generated is a 5x5 mesh.

*In the near future, I hope to add support for n dimentions. This

complicates the above problem and at the same time creates a new one. How

should my program determine which variables correspond to each axis? X, Y,

and Z may be given, but what about a fourth axis? a fifth? ...?

To overcome these problems, I am planning on adding some sort of scripting

to allow the user to input not only the equations, but the parameters for

creating a graph from the equation. This leads me into some more problems:

HOW SHOULD I GO ABOUT DESIGNING A LANGUAGE TO ALLOW THIS?

Especialy while keeping it simple and easy to use?

What I have come up with, so far:

to make a graph where the variables 'xpos', 'y', and 'z' are plotted along

the X, Y, Z axis.

variable 'y' ranges in value of -3 to 10; incrementing by 1

variable 'z' ranges from -5 to 5; incrementing by 0.5

variable 'a' ranges from 0 to 6.28; incrementing by 0.1

-----------

Graph (xpos, y[-3 to 10; 1], z[-5 to 5; 0.5], a[0 to 6.28; 0.1])

{xpos=y^2+z*cos(z)}

(xpos,y,z)

-----------

There are three groupings: (), {}, then ()

*the first grouping declares the variables that will be used and a range of

values thay will have to solve for 'xpos'.

*the second grouping {} gives the equation. xpos =y^2+z=cos(a)

*the third grouping tells the program what variables to assign for each

axis. X: xpos, Y:y, Z:z.

this way, it would be easy to support multiple dimentions.

Unfortunatley, it's not all that easy to understand or learn, I fear.

Anyhow, I'm looking for some one who could suggest a currently existing

language to base this off of, give some pointers, some advise, opinions, or

something else to help me find a bearing in all of this.

Thanks for your time!

C.J. Bell

PS - If you don't really understand what I am saying or what the program is

about, visit my web page and download the current version. However, I must

warn you that it does crash somewhat infrequently (Don't know why yet. I'm

using VC++ and it only happens in the Release version).

http://www.*-*-*.com/