Prev: How to center the position of a control in the
Next: Find value of unknown const that causes integral to equal some
From: Sjoerd C. de Vries on 13 Jun 2010 04:10 Graphics3D[ { Sphere[{0, 0, 0}, 0.65], Polygon[{{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}] } ] You could start reading the documentation of Graphics3D. Open the box "More information" below the syntax description and you'll find some graphics primitives you could use. Cheers -- Sjoerd On Jun 11, 8:09 am, Garapata <warsaw95...(a)mypacks.net> wrote: > I'd like to create a 3D plot of some kind with 2 key elements. > > 1. something that looks like a membrane stretched across a unit > triangle with coordinates {{1,0,0}, {0,1,0},{0,0,1}} > > 2. a hemisphere that would press up from behind the membrane > > Basically a hemisphere pushing up through or intersecting a plane. > > I'll then set up a Manipulate so I can control 3 parameters: > > diameter of the sphere; > how far it penetrates through the plane defined by the tr= iangle; and > where it penetrates the plane of the triangle. > > The Manipulate should be straight forward, I think I can handle that > part easily enough. But the plot part has eluded me. > > I've searched the documentation for anything that looked relevant. > > Graphics3D[{Sphere[{0, 0, 1}, 1], Sphere[{1, 0, 1}, 1/2]}, =E2=80=A= 8 BoxSty= > le - > > > Directive[LightGray]] > > Which shows 2 spheres intersecting and > > Plot3D[UnitTriangle[x, y], {x, -1, 1}, {y, -1, 1}, PlotRange -> All, > BoxStyle -> Directive[LightGray]] > > which shows something one could think of as a membrane both look > promising, but > I can't figure out where to go next. > > I haven't done a lot of graphics with Mathematica and just need an > idea of where to start. > > Any thoughts appreciated. > > Thanks, > G > > P.S. I made a couple of responses to thank forum participants for > their help on previous posts that never appeared in the forum. Not > certain what happened, but belatedly, many many thanks.
From: Narasimham on 13 Jun 2010 04:11
On Jun 11, 11:09 am, Garapata <warsaw95...(a)mypacks.net> wrote: > I'd like to create a 3D plot of some kind with 2 key elements. > > 1. something that looks like a membrane stretched across a unit > triangle with coordinates {{1,0,0}, {0,1,0},{0,0,1}} > > 2. a hemisphere that would press up from behind the membrane > > Basically a hemisphere pushing up through or intersecting a plane. > > I'll then set up a Manipulate so I can control 3 parameters: > > diameter of the sphere; > how far it penetrates through the plane defined by the triangle; and > where it penetrates the plane of the triangle. > > The Manipulate should be straight forward, I think I can handle that > part easily enough. But the plot part has eluded me. > > I've searched the documentation for anything that looked relevant. > > Graphics3D[{Sphere[{0, 0, 1}, 1], Sphere[{1, 0, 1}, 1/2]}, =E2=80=A= 8 BoxSty= > le - > > > Directive[LightGray]] > > Which shows 2 spheres intersecting and > > Plot3D[UnitTriangle[x, y], {x, -1, 1}, {y, -1, 1}, PlotRange -> All, > BoxStyle -> Directive[LightGray]] > > which shows something one could think of as a membrane both look > promising, but > I can't figure out where to go next. > > I haven't done a lot of graphics with Mathematica and just need an > idea of where to start. > > Any thoughts appreciated. > > Thanks, > G > > P.S. I made a couple of responses to thank forum participants for > their help on previous posts that never appeared in the forum. Not > certain what happened, but belatedly, many many thanks. The x,y,z plot limits have to be mentioned for PlotRange. One way of depicting may be: aa = Plot3D[1 - x - y, {x, -1, 1}, {y, -1, 1}, PlotRange -> {{-1, 1}, {-1, 1}, {-1, 2}} ] ; shift = 0.3; sphXYZ = { shift + Cos[ph] Cos[t], Cos[ph] Sin[t], Sin[ph]}; sph = ParametricPlot3D[sphXYZ, {ph, 0, 1.5}, {t, 0, 2 Pi}, PlotRange -> {{-1, 1}, {-1, 1}, {0, 1}}] ; Show[{aa, sph}, PlotRange -> {{-1, 1}, {-1, 1}, {0, 1}}, AspectRatio -> Automatic] Narasimham |