Mathematica Help (Graphing Heart Equation)

  • Context: Mathematica 
  • Thread starter Thread starter Chinnu
  • Start date Start date
  • Tags Tags
    Heart Mathematica
Click For Summary
SUMMARY

The discussion focuses on graphing a specific 3D equation using Mathematica. The equation is defined as (x^2 + (9/4)y^2 + z^2 - 1)^3 - x^2z^3 - (9/80)y^2z^3 = 0 with the constraints -3 ≤ x, y, z ≤ 3. The user successfully utilized the ContourPlot3D function to visualize the equation after initial attempts with Plot3D did not yield the desired results. The final command used for graphing included options for contour styling and axis visibility.

PREREQUISITES
  • Familiarity with Mathematica syntax and functions
  • Understanding of 3D graphing concepts
  • Knowledge of contour plotting techniques
  • Basic algebraic manipulation of equations
NEXT STEPS
  • Explore advanced options in ContourPlot3D for customizing visualizations
  • Learn how to manipulate graphics sizes and scales in Mathematica
  • Investigate the use of Plot3D for different types of equations
  • Study the implications of contour levels in 3D plots
USEFUL FOR

Mathematica users, mathematicians, and educators looking to graph complex equations in three dimensions.

Chinnu
Messages
22
Reaction score
0
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:
Physics news on Phys.org
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...
 

Attachments

  • graph.png
    graph.png
    27.7 KB · Views: 568
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
 

Attachments

  • graph.png
    graph.png
    2.1 KB · Views: 552

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K