2
$\begingroup$

I tried this

ContourPlot[(-100 - 
     50 Cos[γ]) Sin[β] (50 Cos[γ] Sin[β] - (
     50 Cos[β] Cos[γ] (-200 + 
        Cos[β] (50 + 50 Sin[γ])))/Sqrt[
     6400 - (200 - Cos[β] (50 + 50 Sin[γ]))^2]) + 
  50 Cos[β] Sin[γ] (Cos[β] (50 + 
        50 Sin[γ]) + (
     Sin[β] (50 + 50 Sin[γ]) (-200 + 
        Cos[β] (50 + 50 Sin[γ])))/Sqrt[
     6400 - (200 - 
        Cos[β] (50 + 50 Sin[γ]))^2]), {β, 0, 
  2 Pi}, {γ, 0, 2 Pi}]

but it does not produce anything.

Could someone explain why and how to fix it?

$\endgroup$
4
  • $\begingroup$ Your function returns Complex results almost everywhere. Contour plotting needs real valued functions $\endgroup$ Mar 3 '14 at 3:00
  • $\begingroup$ Many thanks, the function is the determinant of a matrix, I want ot know where the function equals to zero, what should I do? $\endgroup$
    – wei ye
    Mar 3 '14 at 3:15
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ Mar 3 '14 at 17:03
  • $\begingroup$ In case you didn't know, you can format your code better by putting four spaces at the front of every code block (or click on the curly-brace button above the question editing area). Further, wrap short inline code snippets in a pair of backticks ``. This will make your post easier to read. $\endgroup$ Mar 3 '14 at 17:04
1
$\begingroup$

Your determinant will be zero when the Real and Imaginary parts are zero. We can plot the contours independently for both and your answer is the intersection:

f[β_, γ_] := (-100 - 50 Cos[γ]) Sin[β] (50 Cos[γ] Sin[β] - (50 Cos[β] Cos[γ] (-200 + 
               Cos[β] (50 + 50 Sin[γ])))/ Sqrt[6400 - (200 - Cos[β] (50 + 50 
               Sin[γ]))^2]) + 50 Cos[β] Sin[γ] (Cos[β] (50 + 50 Sin[γ]) + (Sin[β] (50 + 
               50 Sin[γ]) (-200 + Cos[β] (50 + 50 Sin[γ])))/ Sqrt[6400 - (200 - 
               Cos[β] (50 + 50 Sin[γ]))^2])

ContourPlot[{Re@f[β, γ], Im@f[β, γ]}, {β, 0, 2 Pi}, {γ, 0, 2 Pi}, 
 Contours -> {{0}}, 
 Epilog -> {Red, PointSize[Large], Thickness[.01], 
                 Line[{{0, 3/2 Pi}, {2 Pi, 3/2 Pi}}], 
                 Point[Pi {{1, 1}, {1, 0}, {1/2, 1/2}, {3/2, 1/2}}]}]

Mathematica graphics

$\endgroup$
8
  • $\begingroup$ Seems to be missing solutions, e.g., beta=Pi, gamma=2Pi. $\endgroup$
    – ciao
    Mar 3 '14 at 4:24
  • $\begingroup$ But I don't know what do "Point[Pi {{1, 1}, {1, 0}, {1/2, 1/2}, {3/2, 1/2}, {1, 3/2}, {1/2, 3/2}, {3/2, 3/2}}]" means, could you explain it please. $\endgroup$
    – wei ye
    Mar 3 '14 at 4:34
  • $\begingroup$ @weiye I'm drawing red points by hand at the intersections $\endgroup$ Mar 3 '14 at 4:35
  • $\begingroup$ @weiye And the red line too $\endgroup$ Mar 3 '14 at 4:38
  • $\begingroup$ I see, thanks a lot. $\endgroup$
    – wei ye
    Mar 3 '14 at 4:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.