# 2d graphing

• 11-09-2002
maxthecat
2d graphing
Hello all,

I'm trying to draw a 2D graph based off of the function e^-(x^2 + y^2). I was origionally thinking I could use two for loops and connect the points with the line function; however, since this is a 2D graph, I'm thinking that won't work, as it would connect every Y coordinate to EVERY x coordinate. Now I'm thinking it might be easier to evaluate the function at simply turn a pixel on at each location... Would that work, or would it be easier to treat the funtion as two separate functions (by separating the variables)?

The function is actually a double integral, evaluated from negative infinity to positive infinity both times, if that helps anyone think about it ;)

thanks!!
-maxthecat
• 11-09-2002
Magos
That function doesn't make sense, since it doesn't equal to anything ie: e^-(x^2 + y^2) = 123
Therefore, if you plot it in a graph the entire screen would be filled.

On the other hand, If you plot it in 3D, you would get a nice plane (assuming z is the function value).