Plot in mathematica

  • Mathematica
  • Thread starter SoggyBottoms
  • Start date
  • #1
SoggyBottoms
59
0
I calculated a binocular disparity [itex]\delta[/itex] of two points, see also this topic, and got the following formula:

[itex]\delta = Arctan(\frac{f}{D + d}) - Arctan(\frac{e}{D}) - Arctan(\frac{a - e}{D}) + Arctan(\frac{a - f}{D + d})[/itex]

The assignment now says: Choose a = 6.5 cm, D = 40 cm and e = 3.25 cm. Plot the disparity for [itex]f \in [e - 10, e + 10][/itex] (cm) and [itex]d \in [-20, 20][/itex] (cm).

Does anyone know how I could make such a plot?
 

Answers and Replies

  • #2
jackmell
1,804
53
That's just a function of 2 variables ok, Note I do not use user-defined variable names that begin with capital letters as this may conflict with built-in functions:

Code:
a = 6.5; 
bigD = 40; 
e = 3.25;
 
mydisparity[f_, d_] := ArcTan[f/(bigD + d)] - 
   ArcTan[(a - e)/bigD] + ArcTan[(a - f)/(bigD - d)]
mydisparity[2, 3]

Plot3D[mydisparity[f, d], {f, e - 10, e + 10}, 
  {d, -20, 20}]
 
  • #3
SoggyBottoms
59
0
Thanks! I got it to work.
 
Last edited:

Suggested for: Plot in mathematica

Replies
1
Views
188
  • Last Post
Replies
2
Views
368
Replies
6
Views
424
  • Last Post
Replies
5
Views
731
  • Last Post
Replies
1
Views
157
Replies
0
Views
148
Replies
0
Views
148
  • Last Post
Replies
2
Views
214
Replies
2
Views
1K
  • Last Post
Replies
3
Views
983
Top