how to convert to 3d?
Show older comments
Hai,
I have plotted a hyperbolic lens in matlab using the equation "y=sqrt((n^2-1)*((x-f)^2))+((2)*(f)*(n-1)*(x-f)))". As you can see the equation is in 2d, but I need the lens in 3d, is it possible in matlab? Do you have any equations for lens in 3d?
BSD
4 Comments
Image Analyst
on 23 Sep 2011
What is the other dimension? Assuming n is a constant (index of refraction) and f is a constant (focal length) then y is a function of only x, not x and something else. That is a 1D situation. So what is your second dimension you want to plot? Do you want to plot y as you also change n or f?
bsd
on 23 Sep 2011
Image Analyst
on 23 Sep 2011
Maybe if you say x is really r (radius) and so then you have x and y and then the equation would be z. Then you would have a 2D situation. You could then use meshgrid() and surf(). Can you try that and get back to us?
bsd
on 24 Sep 2011
Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!