Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: '3d plot - mark specific area with another color' topicStudent Support Forum > General > "3d plot - mark specific area with another color"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
toen
03/24/13 00:22am

Hi Alex, one of the following solutions might meet your needs, or give you a hint.

cheers,
toen



A={{0,-1,1},{-1,1,0}};
b={0,0};

Show[
{RegionPlot3D[
And@@Thread[A.{K1,K2,K3}<b]&&
Not[K1<=-1&&
K2<=-1.5&&
K3<=-2.5&&
-10-K1-K2-K3<=-4&&
K1+K2<=-3&&
K1+K3<=-4&&
K2+K3<=-4&&
K1+K2+K3<=-5.5],
{K1,-2.5,0},{K2,-2.5,-1},{K3,-4,-2},
AxesLabel->Automatic,PlotStyle->{Red,Directive[Red,Opacity[0.2]]},PlotPoints->100,MaxRecursion->8,Mesh->None],

RegionPlot3D[
K1<=-1&&
K2<=-1.5&&
K3<=-2.5&&
-10-K1-K2-K3<=-4&&
K1+K2<=-3&&
K1+K3<=-4&&
K2+K3<=-4&&
K1+K2+K3<=-5.5,
{K1,-2.5,0},{K2,-2.5,-1},{K3,-4,-2},
AxesLabel->Automatic,PlotStyle->Green,PlotPoints->100,Mesh->None]}
]



OR


A={{0,-1,1},{-1,1,0}};
b={0,0};

Show[
{RegionPlot3D[
And@@Thread[A.{K1,K2,K3}<b],
{K1,-2.5,0},{K2,-2.5,-1},{K3,-4,-2},
AxesLabel->Automatic,PlotStyle->{Directive[Red,Opacity[0.3]],Directive[Red,Opacity[0.1]]},PlotPoints->40,Mesh->None],

RegionPlot3D[
K1<=-1&&
K2<=-1.5&&
K3<=-2.5&&
-10-K1-K2-K3<=-4&&
K1+K2<=-3&&
K1+K3<=-4&&
K2+K3<=-4&&
K1+K2+K3<=-5.5,
{K1,-2.5,0},{K2,-2.5,-1},{K3,-4,-2},
AxesLabel->Automatic,ColorFunctionScaling->False,ColorFunction->Function[{K1,K2,K3},If[And@@Thread[A.{K1,K2,K3}<b],Green,{Opacity[0.5],Blue}]],PlotPoints->40,Mesh->None]}
]


URL: ,

Subject (listing for '3d plot - mark specific area with another color')
Author Date Posted
3d plot - mark specific area with another color Alex 03/18/13 07:36am
Re: 3d plot - mark specific area with another c... toen 03/24/13 00:22am
< Previous CommentHelp | Reply To Comment | Reply To Topic