I'm trying to program a smooth(?) cone in matlab where
z = x^2+y^2
x^2+y^2 = C
C = [1 1.4 1.7 2 2.2]
I've already realised I should use polar coordinates since it's a circular figure
clear all, clc, clf
theta = linspace(0,2*pi,1000)
r = [1 1.4 1.7 2 2.2] % De olika radierna
[r,theta] = meshgrid(r,theta)
z = r
x = r.*cos(theta)
y = r.*sin(theta)
figure
grid on
meshc(x,y,z)
xlabel('x')
ylabel('y')
zlabel('z')
However the problem that it's modelled from seems to be more of a smooth curve and I get a linear curve, not sure if I got it right and the original problem is not
If anyone has the book Calculus by Adams/Essex 8th Edition it's Figure 12.5 on page 674 that I'm trying to model in matlab.