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!

Homework Help: 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.


    2. Relevant equations

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


    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;

    hold on
    hold off;
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

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