plot3 with implicit domain
3 views (last 30 days)
I'd like to plot f(u,v) = (u,v,sqrt(1-u^2-v^2)) whereas u^2+v^2 <1;
I thought of using plot3 and defining
[u,v] = deal(linspace(-2,2,200));
Thing is, I got to incorporate the implicit condition somehow. Fimplicit3 doesn't help here. I could probalby solve for one of the variables and substitute but that's getting already complex in my head. Is there a handy solution?
DGM on 27 Apr 2021
Maybe something like this?
n = 50;
u = linspace(-2,2,n);
v = linspace(-2,2,n)';
f = u.^2 - v.^2; % the function
dm = (u.^2 + v.^2)<1; % the domain mask
f(~dm) = NaN; % NaN values don't plot