how to convert to 3d?
Ältere Kommentare anzeigen
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 Kommentare
Image Analyst
am 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
am 23 Sep. 2011
Image Analyst
am 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
am 24 Sep. 2011
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!