Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #5169

Re: Artistic impression of cloudy structures

From Roger Bagula <roger.bagula@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Artistic impression of cloudy structures
Date 2011-09-23 07:49 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j5hdn3$7k8$1@smc.vnet.net> (permalink)
References <j5f66o$q7k$1@smc.vnet.net>

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: Artistic impression of cloudy structures Dimitris Emmanoulopoulos <demmanoulopoulos@hotmail.com> - 2011-09-22 11:29 +0000
  Re: Artistic impression of cloudy structures Roger Bagula <roger.bagula@gmail.com> - 2011-09-23 07:49 +0000

csiph-web