1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Plotting 3d parametric equations in Matlab

  1. Mar 13, 2012 #1
    1. The problem statement, all variables and given/known data

    The goal of this exercise is to plot parametric equations so that the image looks like the Agnolotti Pasta shell given in the link below.

    http://www.nytimes.com/interactive/2012/01/10/science/20120110_pasta.html?ref=science.

    2. Relevant equations

    The relevant equations for the Agnolotti Pasta shell are given in the link

    http://www.nytimes.com/interactive/2012/01/10/science/20120110_pasta.html?ref=science.

    3. The attempt at a solution

    I get a completely messed up image with my code below. Im not sure what I am missing to dimensionalize the figure. Any help with how to approach this problem would be greatly appreciated! I feel like I am miles away from what this looks like

    i = linspace(0,60);
    j = linspace(0,60);
    z1 = (10.*sin(i.*pi./120).^5 + i./400.*sin(3.*j.*pi./10)).*cos(19.*j.*pi/2000 +0.03.*pi);
    z2 = (10.*sin(i.*pi./120) + i./400.*sin(3.*j.*pi./10)).*cos(19.*j.*pi/2000 +0.03.*pi);
    z3 = 5.*cos(i.*pi./120).^5.*sin(j.*pi./100) - 5.*sin(j.*pi./100).*cos(i.*pi./120).^200;

    plot3(i,j,z1);
    hold on
    plot3(i,j,z2);
    plot3(i,j,z3);
    hold off;
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: Plotting 3d parametric equations in Matlab
  1. Matlab 3d plotting (Replies: 1)

  2. Matlab plots (Replies: 1)

  3. Matlab plotting (Replies: 6)

  4. Plotting in Matlab (Replies: 1)

Loading...