How to plot feasible space in 3d, after subtracting multiple inequalities
Mostra commenti meno recenti
Hi Guys,
I'm looking for a way to plot a feasible region in 3d space. The feasible region is defined by some inequalities, let's say:
- sqrt(xx.^2 + yy.^2 + zz.^2)<10
- xx.^2+yy.^2-zz<10
- x<2.5
The question is then: how to plot the volume that satisfies all inequalities?
I tried to use isosurface but i don't see how to use more inequalities with that....
Find below what i have so far... Thanks in Advance!
%%%%%%%%%%%%%%%%%
clear all;clc;close all;
%# create coordinates
[xx,yy,zz] = meshgrid(-15:15,-15:15,-15:15);
% boundary condition 1
rr = sqrt(xx.^2 + yy.^2 + zz.^2);
% plot boundary condition 1 with smaller values than 10
isosurface(xx,yy,zz,rr,10);hold on
% boundary condition 2
rr2 = xx.^2+yy.^2-zz;
% plot boundary condition 2 with smaller values than 10
isosurface(xx,yy,zz,rr2,10);
% boundary condition 3
rr3 = xx;
% plot boundary condition 3 with smaller values than 2.5
isosurface(xx,yy,zz,rr3,2.5);
axis equal
Risposta accettata
Più risposte (1)
Matt J
il 23 Lug 2013
I would probably create a logical volume mask of the region,
region= rr<10 & rr2 < 10 & rr3<2.5
Then I would use a 3D viewer from the File Exchange to view "region". There are about a million posted there
Categorie
Scopri di più su Volume Visualization in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!