Doug's MATLAB Video Tutorials

November 20th, 2009

Basics: Volume visualization: 6/9 Displays quiver3 and coneplot

This short video is the sixth of a series of nine that talks about volume visualization. Patrick gave this talk internally to help technical support engineers understand capabilities of MATLAB for volume visualization.

I like his slow, clear, methodical presentation with great visualizations. It is the first time I have deeply understood some of the volume visualization techniques we have.

6 Responses to “Basics: Volume visualization: 6/9 Displays quiver3 and coneplot”

  1. Alex Knight replied on :

    Hi,

    these videos are great – but I find this one stops playing every time at 2:00. The others have all played just fine. (Windows XP/ Google Chrome).

    Alex

  2. dhull replied on :

    @Alex

    Thanks for the kind words. I was unable to reproduce the error. Please try again.

    Thanks,
    Doug

  3. Nilotpal replied on :

    Hi, great videos. I’m having a trouble getting the correct output for the code snippet as on 4:05. have implemented just the following code on editor as shown here:

    [x, y, z]=meshgrid(-1.5:0.1:1.5);
    u=x+cos(4*x)+3;
    v=sin(4*x)-sin(2*y);
    w=-z;
    [cx, cy, cz]=meshgrid([-1 0 1]);
    coneplot(x, y, z, u, v, w, cx, cy, cz);
    

    but i ended up getting just a 2D plot in black and white with -1.5 to 1.5 on both axes. nd the cones are plotted inside this 2D plot. Am i doing something wrong or missing something? do i have to add something to this code?

  4. Daniel Armyr replied on :

    @Nilotpal:
    You are correct. The code in this presentation seems to only hilight the most important functions. The person making the presentation has obviously spent significant time prettifying the plots but not published the code for that.

    To get a view similar to the one in the movie, type:

    >>view(3)

  5. Daniel Armyr replied on :

    OK, seriously guys….
    When I run the code below, I get polka-striped pink cones. That was not expected….

    [x, y, z]=meshgrid(-1.5:0.5:1.5);
    u=x+cos(4*x)+3;
    v=sin(4*x)-sin(2*y);
    w=-z;
    [cx, cy, cz]=meshgrid([-1 0 1]);
    c = sqrt(u.^2+v.^2);
    h = coneplot(x, y, z, u, v, w, cx, cy, cz, c);
    view(-150,20);
    set( h, ‘EdgeColor’, ‘none’ );
    camlight(‘left’);

  6. dhull replied on :

    @Daniel,

    Weird. I just copy pasted your code, and it was all fine.
    Still happening for you?

    Doug

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


MathWorks

Doug Hull is a proud MathWorker who is on a mission to help you with MATLAB.

Doug's picture

These postings are the author's and don't necessarily represent the opinions of The MathWorks.