Thread Subject: patch created from isosurface hides plot3 inside the surface

Subject: patch created from isosurface hides plot3 inside the surface

From: Abe Lau

Date: 29 May, 2008 10:03:03

Message: 1 of 5

Hi all,
I was trying to create patches from an isosurface from a
3-D array A (1 being inside the object, and 0 outside) using
the command:
patch(reducepatch(isosurface(x,y,z,A, 0), P))

Upon the surface creation, I was trying to use plot3 to plot
some of the datum points which is supposed to be on the
surface. However, the datum points always like to be shown
"inside" the surface, rather than half-half, or on the
surface. This makes visualization very difficult.

I guess the image below explains it all:
[url=points_hiding_inside_surface][img]http://img2.freeimagehosting.net/uploads/54addd07b2.png[/img][/url]
http://img2.freeimagehosting.net/uploads/54addd07b2.png

Is there any way I could get the plot more visible?

Thanks,
Abe

Subject: patch created from isosurface hides plot3 inside the surface

From: Abe Lau

Date: 16 Jun, 2008 05:54:02

Message: 2 of 5

"Abe Lau" <abe@nonexistancegmail.com> wrote in message
<g1lv0n$6em$1@fred.mathworks.com>...
> Hi all,
> I was trying to create patches from an isosurface from a
> 3-D array A (1 being inside the object, and 0 outside) using
> the command:
> patch(reducepatch(isosurface(x,y,z,A, 0), P))
>
> Upon the surface creation, I was trying to use plot3 to plot
> some of the datum points which is supposed to be on the
> surface. However, the datum points always like to be shown
> "inside" the surface, rather than half-half, or on the
> surface. This makes visualization very difficult.
>
> I guess the image below explains it all:
>
[url=points_hiding_inside_surface][img]http://img2.freeimagehosting.net/uploads/54addd07b2.png[/img][/url]
> http://img2.freeimagehosting.net/uploads/54addd07b2.png
>
> Is there any way I could get the plot more visible?
>
> Thanks,
> Abe

Just wondering if any others had similar problem before, or
am I just creating the surface in a wrong way?

It looks to me that the datum points tends to be shown
"outside" of the surface on a convex surface, and "inside"
on a concave surface... wonder if it's a default behaviour,
or if I could change it.

I was thinking to shrink the volume before I create the
isosurface, but looks like if I wanna go that way, I will
need to loop through every images and shrink it, which is
quite time consuming (not to mention the model is changed)

Any help is much appreciated.

Subject: patch created from isosurface hides plot3 inside the surface

From: gianni schena

Date: 16 Jun, 2008 08:12:01

Message: 3 of 5


you can use alpha(0.1) to make the isosurface transparent

%%%%
.... alpha sets one of three transparency
properties, depending on what arguments you specify with
the call to this function.








"Abe Lau" <abe@nonexistancegmail.com> wrote in message
<g1lv0n$6em$1@fred.mathworks.com>...
> Hi all,
> I was trying to create patches from an isosurface from a
> 3-D array A (1 being inside the object, and 0 outside)
using
> the command:
> patch(reducepatch(isosurface(x,y,z,A, 0), P))
>
> Upon the surface creation, I was trying to use plot3 to
plot
> some of the datum points which is supposed to be on the
> surface. However, the datum points always like to be
shown
> "inside" the surface, rather than half-half, or on the
> surface. This makes visualization very difficult.
>
> I guess the image below explains it all:
> [url=points_hiding_inside_surface][img]
http://img2.freeimagehosting.net/uploads/54addd07b2.png
[/img][/url]
> http://img2.freeimagehosting.net/uploads/54addd07b2.png
>
> Is there any way I could get the plot more visible?
>
> Thanks,
> Abe

Subject: patch created from isosurface hides plot3 inside the surface

From: Abe Lau

Date: 16 Jun, 2008 10:04:01

Message: 4 of 5

Thanks for your input Gianni.
Yes I have actually tried to set transparency to workaround
the problem, as you could probably tell from the screenshot
attached.

While this could be a workaround, the effect is far from
good unfortunately, especially when you only want to
illustrate what is on the surface, but not everything behind
it. I will need to set the alpha to a very low value to
"uncover" the datum points and this makes the entire surface
almost transparent (of cos, haha). More to say, if I would
like to export the figure in a vector format, all the
transparency will be removed :(

Any other idea?

"Gianni Schena" <schena@univ.trieste.it> wrote in message
<g3578h$djn$1@fred.mathworks.com>...
>
> you can use alpha(0.1) to make the isosurface transparent
>
> %%%%
> .... alpha sets one of three transparency
> properties, depending on what arguments you specify with
> the call to this function.
>
>
>

Subject: patch created from isosurface hides plot3 inside the surface

From: Abe Lau

Date: 24 Jun, 2008 01:34:02

Message: 5 of 5

Any insight on this problem? or am I basically creating the
patches and plot incorrectly?

The summery now:
From a 3D volumetric array:
patch(reducepatch(isosurface(x,y,z,A, 0), P))

I want to plot some of the surface coordinates for
illustration, using "plot3"

However, many datum points (esp in concave area) got hidden
"inside" the model, even when the point size is huge, as
shown below:
http://img2.freeimagehosting.net/uploads/54addd07b2.png

Gianni suggested setting alpha to 0.1 to show the points,
but the model is then too transparent, displaying not only
the surface points, but everything. Problem with export
also, where transparency is not supported in vector-based
format.

PS: is this a proper newsgroup, and is top-post/bottom-post
preferred? can't find it in the rules, and I'm reading this
from the mathworks website also....

Thanks

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
isosurface tran... Gianni Schena 16 Jun, 2008 04:17:12
patch isosurfac... Abe Lau 16 Jun, 2008 01:55:08
surface patch p... Abe Lau 29 May, 2008 06:05:06
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com