MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Putting Points and Lines into RegionPlot3D

On Oct 31, 8:09 am, Brentt <brenttnew... at> wrote:
> 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}}]}]

If you look at the form of your RegionPlot3D

(* ,Epilog->{Line[{origin,{0,1,0}}]}*)];


you'll see that rp is itself just a Graphics3D with two arguments, the
first a GraphicsComplex and the second is the option list. So if for
some reason you don't want to compose and Show graphics (or if it
drives you nuts figuring out how the composition order determines the
output), you can compose a single Graphics3D:

rp[[1]]                              (* the RegionPlot3D
GraphicsComplex *)
,Arrow[{origin,{1,1,1}}]    (* your stuff *)
,rp[[2]]                             (* original Options *)

Fred Klingener

  • Prev by Date: Re: Putting Points and Lines into RegionPlot3D
  • Next by Date: Re: Simple DSolve equation
  • Previous by thread: Re: Putting Points and Lines into RegionPlot3D
  • Next by thread: Re: nVidia Optumus prevents using CUDA?