how to convert to 3d?
Afficher commentaires plus anciens
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 commentaires
Image Analyst
le 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
le 23 Sep 2011
Image Analyst
le 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
le 24 Sep 2011
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Surface and Mesh Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!