Reflection of a surface across an axis

10 ビュー (過去 30 日間)
Braden
Braden 2011 年 11 月 14 日
Sorry if the title is a little confusing...here's my question:
- I have a 3-D graph with two surfaces on it. They are identical in almost every regard except they are mirror images of each other on the X-Axis. In other words, if we look at them on a xy or xz graph, you end up with a mirror image at the x=0 plane.
- Is it possible to reflect one of the two surfaces to get the two surfaces to overlap? I've been playing with the rotate command for a while and haven't managed to figure it out.
Thanks.

採用された回答

Jonathan
Jonathan 2011 年 11 月 14 日
Braden,
This example should help you see what to do.
hand = surf(peaks);
set(hand, 'XData', -1*get(hand,'XData'));

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2011 年 11 月 14 日
Use copyobj() to clone one of the surfaces complete with properties. Then get() the XData property of the cloned object, multiply it by negative 1, and set() that as the new XData property. You now have a mirror object.
Note: the procedure might be a bit different for some kinds of surfaces, especially patches built up from vertex and face lists.

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by