Filter löschen
Filter löschen

how to convert to 3d?

2 Ansichten (letzte 30 Tage)
bsd
bsd am 23 Sep. 2011
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
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
bsd am 24 Sep. 2011
I did not understand your explanation...
BSD

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 23 Sep. 2011
It's probably not "convert". If you don't have the third dimension, then it is a 2d plot. If you want to view it in 3d, you can use view().
plot(magic(10));
view(3)
Then, click the "rotate 3D" button to rotate and see the effect.
  3 Kommentare
bsd
bsd am 23 Sep. 2011
what is BTW?
BSD
Fangjun Jiang
Fangjun Jiang am 23 Sep. 2011
By the way, according to http://en.wikipedia.org/wiki/BTW.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Numeric Types finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by