# Mathematica Help (Graphing Heart Equation)

1. Apr 15, 2012

### Chinnu

ok, I have tried and failed.

How does one graph the following on mathematica in 3D:

$\left( x^{2} + \frac{9}{4} x^{2} + z^{2} -1\right)^{3} - x^{2}z^{3} - \frac{9}{80}y^{2}z^{3} =0$ $with -3 \leq x,y,z\leq3$

If someone could give me the command (what to enter), that would help.

Heres what I tried:

Plot3D[f[x,y,z],{x,-3,3},{y,-3,3},PlotRange$\rightarrow${-3,3}],

where I pre defined f as the function above (this I'm fairly certain was done correctly)

Last edited: Apr 16, 2012
2. Apr 16, 2012

### Chinnu

ok, I tried the following and got the picture attached:

ContourPlot3D$\left[\left( x^{2}+\frac{9}{4} y^{2}+z^{2} -1 \right)^{3} - x^{2} z^{3} - \frac{9}{80} y^{2} z^{3},\left\{x, -3, 3 \right\}, \left\{ y, -3, 3 \right\}, \left\{ z, -3, 3 \right\}\right]$

It is, of course, not what I am trying to achieve.....

#### Attached Files:

• ###### graph.png
File size:
32.5 KB
Views:
144
3. Apr 16, 2012

### Chinnu

I got it finally....

heres what I did

f[x_,y_,z_] $= \left( x^{2}+\frac{9}{4} y^{2}+z^{2} -1 \right)^{3} - x^{2} z^{3} - \frac{9}{80} y^{2} z^{3}$

ContourPlot3D[f[x, y, z], {x, -3, 3}, {y, -3, 3}, {z, -3, 3}, Boxed -> False, Contours -> {0}, ContourStyle -> Red, Axes -> False,
Mesh -> None]

and I got the following graph (I haven't yet figured out how to resize it (by scaling within mathematica itself, not just re-sizing the image), since it is kind of small now

File size:
4.9 KB
Views:
129