/********************************************************************************** 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" #macro CrossBeddedSandstone() //Default parameter values: #ifndef (RandNr) #local RandNr = 2; #end #ifndef (Frequency) #local Frequency = 5; #end //number of reptitions along the gradient #ifndef (Turbulence) #local Turbulence = 0.05; #end //keep low! 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 //rotation of upper cross-bedded set #ifndef (Bedrot2) #local Bedrot2 = <0.0, 0.0, 15.0>; #end //rotation of lower cross-bedded set #ifndef (Set) #local Set = 0.5; #end //set height #if (Set<0.1 ) #local Set = 0.1; #end //minimum set height control #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 #local Seed = seed(RandNr); #declare CrossBeddedSst = texture { gradient y turbulence Turbulence frequency Frequency texture_map { [0.1 pigment { agate agate_turb 1.0 pigment_map {Psandstone} scale <1.0, 0.01, 1.0> } #if (Norm) normal { agate Ndepth agate_turb 1.0 scale <1.0, 0.01, 1.0> } #end finish { ambient 0.05 brilliance 0.5 } ] [Set pigment { agate agate_turb 1.0 pigment_map {Psandstone} scale <1.0, 0.01, 1.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 1.0 scale <1.0, 0.01, 1.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 pigment { agate agate_turb 1.0 pigment_map {Psandstone} scale <1.0, 0.01, 1.0> } #if (Norm) normal { agate Ndepth agate_turb 1.0 scale <1.0, 0.01, 1.0> } #end finish { ambient 0.05 brilliance 0.5 } ] [Set+0.1 pigment { agate agate_turb 1.0 pigment_map {Psandstone} scale <1.0, 0.01, 1.0> } #if (Norm) normal { agate Ndepth agate_turb 1.0 scale <1.0, 0.01, 1.0> } #end finish { ambient 0.05 brilliance 0.5 } ] [Set+0.11 pigment { agate agate_turb 1.0 pigment_map {Psandstone} scale <1.0, 0.01, 1.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 1.0 scale <1.0, 0.01, 1.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.0, 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.1 // 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 {(pow(x,2) + pow(y,2) + pow(z,2) - pow(1.0,2)) + f_Height(x, y, z)/H} max_gradient 2.0 contained_by {box {<-1,-1,-1>, < 1, 1, 1>}} accuracy 1e-3 } CrossBeddedSandstone() object {Sphere texture{CrossBeddedSst}}