What I've done here is split up a curve into sections and defined each of the sections through different functions.
I know how to plot a 3-D parametric curve using different t functions for x, y and z. So for my first section I have used the following:
>> t = linspace(0,pi); >> x = t; >> y = 3*t; >> z = 2*pi + 0*t; >> plot3(x,y,z)
This creates the first section of my curve. Now I want to change the function that defines y for the t values from pi to 2pi.
i.e. for t = linspace(pi,2*pi), I want to change y = 3*pi + sin(t-pi)
Can anyone show me how to do this? Also, eventually I want to plot all the different sections onto 1 set of axes.
On a side note, when I enter "y = 3*pi – 3(t-2*pi);", I am confronted with: | Error: Unbalanced or unexpected parenthesis or bracket. Why?
Thanks for any help
Best Answer