Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: Artistic impression of cloudy structures

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121641] Re: Artistic impression of cloudy structures
  • From: Roger Bagula <roger.bagula at gmail.com>
  • Date: Fri, 23 Sep 2011 03:44:52 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <j5f66o$q7k$1@smc.vnet.net>

The skycolor model by Jacopo Bertolotti is very good!
Here is a way that is actually used in ray tracing program
like Bryce; you put flat area larger and behind the scene
and project you ski image on that:

Clear[x, y, z, n, t, r, p, skycolor]
x1 = Cos[t]^3*Sin[p];
y1 = Sin[t]^3*Sin[p];
z1 = Cos[p];
w1 = {x1, z1, y1};
skycolor[x_] := RGBColor[x, x, 1];
(* forground model*)
g1 =
 ParametricPlot3D[w1, {t, 0, Pi}, {p, -Pi, Pi}, Axes -> True,
  Mesh -> None, Boxed -> False, PlotPoints -> 30,
  TextureCoordinateFunction -> ({2 #4, #5} &),
  PlotStyle ->
   Directive[Magenta, Specularity[White, 50],
    Texture[ExampleData[{"ColorTexture", "Metal4"}]]],
  Lighting -> "Neutral"]
x2 = 4*Cos[t]*p/5;
y2 = 4*Sin[t]*p/5;
z2 = 0;
(* disk to project the sky onto in xz plane*)
gb =
 ParametricPlot3D[{x2, z2, y2}, {t, -Pi, Pi}, {p, 0, 5},
  Boxed -> False, Axes -> True,
  PlotStyle -> {Black, Specularity[White, 10]}, Mesh -> False,
  ColorFunction -> skycolor]
(* put them together with a limited field of vision*)
Show[{g1, gb},
 PlotRange -> {{-2, 2}, {-2, 2}, {-2, 2}}, Axes -> False]

Roger Bagula
Roger Bagula




  • Prev by Date: 1-liner wanted
  • Next by Date: Re: How to distribute specific tasks to specific subkernels?
  • Previous by thread: Re: Artistic impression of cloudy structures
  • Next by thread: Re: Artistic impression of cloudy structures