3D shape visualization

조회 수: 3 (최근 30일)
Anna
Anna 2011년 6월 20일
I need to visualize a 3D shape (a series of spherical harmonics). Currently I am using surf or mesh but it needs points to be defined on a cartesian (x,y) grid. I get acceptable quality when x- and y-vector size is around (34,1). This makes z-vector size to be (34,34) which is too large for my problem. Is there any way to visualize a 3D shape without computing value of the function for so many points?

답변 (4개)

Andrew Newell
Andrew Newell 2011년 6월 20일
I'm surprised that you are finding spherical harmonics so expensive to evaluate. This spherical harmonics demo takes only 0.3 seconds on my computer. Perhaps it will give you a few tips on writing faster code.

Anna
Anna 2011년 6월 20일
Thank you Andrew. But the point is that I need to repeat those calculations ~2^20 times. Another thing is that I need to simultaneously visualize hundreds of those shapes in one figure this makes the figure be really "heavy" and hard to handle.
  댓글 수: 3
Sean de Wolski
Sean de Wolski 2011년 6월 20일
Kind of what Andrew said: What do you gain by simultaneously viewing hundreds of shapes?
Anna
Anna 2011년 6월 20일
I am making a field of those shapes to monitor diffusion changes with coordinates. It looks okay, no need for a huge screen. Here is the example of what I am plotting. http://imgur.com/UFznm

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2011년 6월 20일
patch() is the only way I can think of at the moment to represent objects with irregular coordinates. Individual patch() are not restricted to planes, but linear interpolation of coordinates is done, so patches cannot be used to construct curved surfaces, only approximations to curved surfaces. Still, you might be able to create something that approximates your surface reasonably with fewer points than a mesh would require.
Question: can the individual items you are drawing be created by starting with a prototype centered on the origin, and scaling and rotating and translating that prototype? Are substantial numbers of them the same shape (to within the resolution you are willing to use to define them), or does the shape of each vary?
  댓글 수: 1
Anna
Anna 2011년 6월 20일
Thank you Walter. Approximation is what I am looking for. Will check how patch is working.
There are two different types of items. The rest of them are approximately a result of translation or/and rotation of those. Also, there are large clusters of items looking almost the same.

댓글을 달려면 로그인하십시오.


Andrew Newell
Andrew Newell 2011년 6월 20일
Judging by the figure you have provided, you only need first order spherical harmonics. If so, you might want to consider representing them by three perpendicular axes, scaled by the coefficients of the harmonics and suitably rotated. It would be much simpler but have the same information content.
  댓글 수: 1
Anna
Anna 2011년 6월 21일
I am using 0th, 2nd and 4th order of SH (shapes are even functions of theta and phi).

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by