Re: Putting Points and Lines into RegionPlot3D
- To: mathgroup at smc.vnet.net
- Subject: [mg122630] Re: Putting Points and Lines into RegionPlot3D
- From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
- Date: Fri, 4 Nov 2011 05:58:58 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
Hi, Try this: origin = {0, 0, 0}; pBox = 1.5; sph = RegionPlot3D[ x^2 + y^2 + z^2 <= 1, {x, -pBox, pBox}, {y, -pBox, pBox}, {z, -pBox, pBox}, PlotStyle -> Directive[Yellow, Opacity[0.2]], Mesh -> None]; ln = Graphics3D[Line[{origin, {0, 1, 0}}]]; Show[{sph, ln}] Hope it helps, Have fun, Alexei Hello, How can one put points and lines into a 3D plot? Here is my non-working code for having a unit sphere with a line inside of it going from the origin to 1 on the x-axis. origin = {0, 0, 0}; pBox = 1.5; RegionPlot3D[ x^2 + y^2 + z^2 <= 1, {x, -pBox, pBox}, {y, -pBox, pBox}, {z, -pBox, pBox}, PlotStyle -> Directive[Yellow, Opacity[0.2]], Mesh -> None, Epilog -> {Line[{origin, {0, 1, 0}}]}] Epilog seems to expect only 2D graphics object, which makes me think its not the right option to use. But what option would I use? Is there an available option? Plot3D has the same problem. Alexei BOULBITCH, Dr., habil. IEE S.A. ZAE Weiergewan, 11, rue Edmond Reuter, L-5326 Contern, LUXEMBOURG Office phone : +352-2454-2566 Office fax: +352-2454-3566 mobile phone: +49 151 52 40 66 44 e-mail: alexei.boulbitch at iee.lu<mailto:alexei.boulbitch at iee.lu>