Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Why aren't both sides of a surface equally opaque?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80974] Why aren't both sides of a surface equally opaque?
  • From: "David Park" <djmpark at comcast.net>
  • Date: Thu, 6 Sep 2007 05:38:13 -0400 (EDT)

The following illustrates a strange behavior of surfaces with respect to 
opacity. The code draws a narrow cylinder with a red line on the inside of 
the cylinder and a black line on the outside of the cylinder. The cylinder 
is completely opaque. The inside red line does not show through the 
cylinder, which is proper behavior. However, the black outside line does 
show through the back face for a considerable range, which is certainly 
improper behavior.

cylinder =
  First[ParametricPlot3D[{5 Cos[\[Theta]1], 5 Sin[\[Theta]1],
     z}, {\[Theta]1, 0, 2 \[Pi]}, {z, -1, 1},
    PlotStyle -> {FaceForm[Orange, LightGray]},
    PlotPoints -> {41, 5},
    Mesh -> None]];

outsideline =
  First[ParametricPlot3D[{5.1 Cos[\[Theta]1], 5.1 Sin[\[Theta]1],
     0.2}, {\[Theta]1, 0, 2 \[Pi]},
    PlotStyle -> {Black},
    PlotPoints -> 41]];

insideline =
  First[ParametricPlot3D[{4.9 Cos[\[Theta]1],
     4.9 Sin[\[Theta]1], -0.2}, {\[Theta]1, 0, 2 \[Pi]},
    PlotStyle -> {Red},
    PlotPoints -> 41]];

Show[Graphics3D[
  {cylinder,
   outsideline,
   insideline}],
 Lighting -> "Neutral",
 ViewPoint -> {1.718, -2.747, 0.975},
 Boxed -> False


-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/




  • Prev by Date: Re: random points!
  • Next by Date: Re: random points!
  • Previous by thread: Double Integral of long expressions in Mathematica
  • Next by thread: Re: Why aren't both sides of a surface equally