/********************************************************************************** Persistence of Vision Ray Tracer Scene Description File File name : Cross-bedded sandstone_mcr.pov Version : 3.6.1c / MegaPOV 1.21 Description : Macro for generating a series of cross-bedded sandstone sets Date : May 2006 Author : Thomas A. M. de Groot E-mail : t.degroot@inter.nl.net Copyright (C) 2006. All rights reserved. Use and/or modification of this scene is free, except for commercial purposes. Commercial distribution is not allowed without written permission from the author. **********************************************************************************/ #include "transforms.inc" #include "functions.inc" #macro CrossBeddedSandstone() //Default parameter values: #ifndef (Tabvar) #local Tabvar = 5; #end //tabular set variation; higher values = more tabular #ifndef (Frequency) #local Frequency = 5; #end //number of repetitions along y. Changes thickness of sets! #ifndef (Turbulence) #local Turbulence = 0.05; #end //keep low! Simulates loading and water-logged deformation (see also Setturb). High values give other interesting textures however #ifndef (Psandstone) #local Psandstone = pigment_map { [0.0 color rgb <1.0, 0.8854, 0.604167>] [0.4 color rgb <0.98, 0.781, 0.438> ] [0.8 color rgb <0.906, 0.656, 0.336> ] [1.0 color rgb <0.824, 0.531, 0.234> ] } #end //default pigment_map #ifndef (Bedrot1) #local Bedrot1 = <0.0, 0.0, -15.0>; #end //steepness (x,z) & rotation (y) of lower cross-bedded set (in nature: max steepness = ±37 degrees) #ifndef (Bedrot2) #local Bedrot2 = <0.0, 0.0, 15.0>; #end //steepness (x,z) & rotation (y) of upper cross-bedded set #ifndef (Setvar) #local Setvar = 0.8; #end //variation of foreset thickness #ifndef (Set) #local Set = 0.5; #end //set boundary #if (Set<0.1 ) #local Set = 0.11; #end //minimum set boundary control #ifndef (Setturb) #local Setturb = 0.01; #end //keep low!! vertical deformation of foresets (loading) #ifndef (Norm) #local Norm = true; #end //use of a normal #ifndef (Ndepth) #local Ndepth = 0.05; #end //normal bump depth #ifndef (Tscale) #local Tscale = 1; #end //final texture scale (use Frequency preferentially) #ifndef (Trot) #local Trot = <0, 0, 0>; #end //final texture rotation #ifndef (Ttrans) #local Ttrans = <0, 0, 0>; #end //final texture translation #declare CrossBeddedSst = texture { function {y - f_wrinkles(x, 0, z)/Tabvar } warp {turbulence Turbulence} frequency Frequency texture_map { [0.08 //toeset lower cross-bedded set pigment { agate agate_turb Setvar pigment_map {Psandstone} scale <1.0, 0.01, 1.0> warp {turbulence <0,Setturb,0>} } #if (Norm) normal { agate Ndepth agate_turb Setvar scale <1.0, 0.01, 1.0> warp {turbulence <0,Setturb,0>} } #end finish { ambient 0.05 brilliance 0.5 } ] [0.1 //start of lower cross-bedded set pigment { agate agate_turb Setvar pigment_map {Psandstone} scale <1.0, 0.01, 1.0> warp {turbulence <0,Setturb,0>} Axis_Rotate_Trans(x, Bedrot1.x) Axis_Rotate_Trans(z, Bedrot1.z) Axis_Rotate_Trans(y, Bedrot1.y) } #if (Norm) normal { agate Ndepth agate_turb Setvar scale <1.0, 0.01, 1.0> warp {turbulence <0,Setturb,0>} Axis_Rotate_Trans(x, Bedrot1.x) Axis_Rotate_Trans(z, Bedrot1.z) Axis_Rotate_Trans(y, Bedrot1.y) } #end finish { ambient 0.05 brilliance 0.5 } ] [Set-0.01 //end of lower cross-bedded set pigment { agate agate_turb Setvar pigment_map {Psandstone} scale <1.0, 0.01, 1.0> warp {turbulence <0,Setturb,0>} Axis_Rotate_Trans(x, Bedrot1.x) Axis_Rotate_Trans(z, Bedrot1.z) Axis_Rotate_Trans(y, Bedrot1.y) } #if (Norm) normal { agate Ndepth agate_turb Setvar scale <1.0, 0.01, 1.0> warp {turbulence <0,Setturb,0>} Axis_Rotate_Trans(x, Bedrot1.x) Axis_Rotate_Trans(z, Bedrot1.z) Axis_Rotate_Trans(y, Bedrot1.y) } #end finish { ambient 0.05 brilliance 0.5 } ] [Set //toeset upper cross-bedded set pigment { agate agate_turb Setvar pigment_map {Psandstone} scale <1.0, 0.01, 1.0> warp {turbulence <0,Setturb,0>} } #if (Norm) normal { agate Ndepth agate_turb Setvar scale <1.0, 0.01, 1.0> warp {turbulence <0,Setturb,0>} } #end finish { ambient 0.05 brilliance 0.5 } ] [Set+0.08 pigment { agate agate_turb Setvar pigment_map {Psandstone} scale <1.0, 0.01, 1.0> warp {turbulence <0,Setturb,0>} } #if (Norm) normal { agate Ndepth agate_turb Setvar scale <1.0, 0.01, 1.0> warp {turbulence <0,Setturb,0>} } #end finish { ambient 0.05 brilliance 0.5 } ] [Set+0.1 //start of upper cross-bedded set pigment { agate agate_turb Setvar pigment_map {Psandstone} scale <1.0, 0.01, 1.0> warp {turbulence <0,Setturb,0>} Axis_Rotate_Trans(x, Bedrot2.x) Axis_Rotate_Trans(z, Bedrot2.z) Axis_Rotate_Trans(y, Bedrot2.y) translate <5.0, 3.0, 9.0> } #if (Norm) normal { agate Ndepth agate_turb Setvar scale <1.0, 0.01, 1.0> warp {turbulence <0,Setturb,0>} Axis_Rotate_Trans(x, Bedrot2.x) Axis_Rotate_Trans(z, Bedrot2.z) Axis_Rotate_Trans(y, Bedrot2.y) translate <5.0, 3.0, 9.0> } #end finish { ambient 0.05 brilliance 0.5 } ] } scale Tscale Axis_Rotate_Trans(x, Trot.x) Axis_Rotate_Trans(z, Trot.z) Axis_Rotate_Trans(y, Trot.y) translate Ttrans } #end //of macro //====================================================================== #version 3.6; #include "colors.inc" global_settings { assumed_gamma 1.0 } // ---------------------------------------- camera { location <0.0, 0.5, -4.0> direction 1.5*z right x*image_width/image_height look_at <0.0, 0.3, 0.0> } sky_sphere { pigment { gradient y color_map { [0.0 rgb <0.6,0.7,1.0>] [0.7 rgb <0.0,0.1,0.8>] } } } light_source { <0, 0, 0> // light's position (translated below) color rgb <1, 1, 1> // light's color translate <-30, 30, -30> } light_source { <0, 0, 0> // light's position (translated below) color rgb <1, 1, 1>*0.3 // light's color translate <30, 30, -30> shadowless } // ---------------------------------------- plane { y, -1 pigment { color rgb <0.7,0.5,0.3> } } //CrossBeddedSandstone() //sphere {0.0, 1 texture {CrossBeddedSst}} #declare f_Height = function{0.5*f_wrinkles(x*.4, y*.4, z*.4)} #declare H = 0.6; #declare Sphere = isosurface { function {f_sphere(x,y,z,2.4) + f_Height(x, y, z)/H} max_gradient 2.0 contained_by {box {-1.6, 1.6}} accuracy 1e-3 } #declare Tabvar = 5; #declare Bedrot2 = <0,50,-20>; #declare Set = 0.6; #declare Frequency = 2; CrossBeddedSandstone() object {Sphere texture{CrossBeddedSst} rotate 25*y translate 3*z }