File:Moonlight and fractal trees 1 r 1.png
Original file (1,600 × 1,200 pixels, file size: 1.49 MB, MIME type: image/png)
Captions
Summary[edit]
DescriptionMoonlight and fractal trees 1 r 1.png |
English: Moonlight and fractal trees |
Date | |
Source | Own work |
Author | Merikanto |
POV-Ray 3.7 source code
//
// moonlight, clouds, fractal trees and grass
// POV-Ray 3.7 source code
//
// 3.8.2023 0000.0006
//
//#declare doRad = true;
- declare doRad = false;
- if(doRad)
global_settings
{
assumed_gamma 1.0
ambient_light 0
radiosity{
pretrace_start 0.08
pretrace_end 0.02
count 50
nearest_count 5
recursion_limit 4
error_bound 1
low_error_factor .5
gray_threshold 0.0
minimum_reuse 0.015
brightness 50
media on
// media_interaction on
}
}
- end
- include "colors.inc"
- include "textures.inc"
- include "stones.inc"
- include "skies.inc"
- include "functions.inc"
// camera{ location <-0.1,0.075,-1> look_at <0, 0, 0> angle 40}
camera {
// angle 32
angle 80
//location < 0, 1, -10>
location < 0, 1/5, -2>
look_at < 0, 0.7, 0>
// focal_point < 0, 0, 0>
// aperture 0.08
// blur_samples 20
// right < 4/3, 0, 0>
// up < 0, 1, 0 >
// sky < 0, 1, 0 >
}
#declare FIIA=30;
#declare FIIX1 = 270-FIIA ;
#declare FIIY1 = 0 ;
// maybe NOK
- declare movey=cos(radians(FIIY1))*1;
- declare movez=cos(radians(FIIX1))*1;
light_source { <0,sin(radians(FIIA))*1e9,cos(radians(FIIA))*1e9 > 1 }
#declare color1=<0.45, 0.5, 0.75>;
#declare color2=1-<0.25, 0.3, 0.55>;
sky_sphere {
pigment {
gradient y
// scale 2
// scale x/2
// poly_wave 0.6
// poly_wave 1/8
// cubic_wave
poly_wave 1/7
pigment_map {
// moon
[0
// rgb 10
granite scale 0.2 poly_wave 0.5 color_map {
[0.0 rgb 2*color2]
[1 rgb 1.5*color2] }
]
[0.4
// rgb 10
granite scale 0.2 poly_wave 0.5 color_map {
[0.0 rgb 2*color2]
[1 rgb 1.5*color2] }
]
// halo
[0.4 rgb 2*color1]
[1 rgb <0,0,0.05>]
}
rotate x*FIIX1
rotate y*FIIY1
}
}
// thin clouds
- declare upclouds1=plane {
y,10000
hollow
texture {
pigment {
wrinkles
// dents
// granite
// ripples
// wood
// waves
// bumps
turbulence 1
octaves 64
scale 0.3
pigment_map {
[0 rgbt <1,1,1,1>]
// [.4 rgbt <1,1,1,1>]
[1 rgbt <1,1,1,0>]
}
scale 10000*10
}
finish {
diffuse 1
refraction 1
reflection 0
}
}
double_illuminate
}
- declare middleclouds1=plane {
y,3000
hollow
texture {
pigment {
// dents
granite
// agate
//bumps
// wrinkles
turbulence 0.03
octaves 64
scale 0.03
pigment_map {
[0 rgbt <1,1,1,1>]
// [0.5 rgbt <1,1,1,1>]
[0.7 rgbt <1,1,1,0.5>]
[1 rgbt <1/2,1/2,1/2,0.2>]
}
scale 3000*15
}
finish {
diffuse 0.8
refraction 1
reflection 0.0
ambient 0.2
}
}
double_illuminate
}
#declare lowclouds1=
object {
/*
//plane {y,1500 }
sphere {0,1
scale 1000 scale y/3
}
*/
union {
- for (nn,40,46)
//#declare nn=10;
plane {y, 1000+nn*0.5 }
- end
}
hollow
texture {
pigment {
/*
function {
//f_granite(x,y,z)
// f_crackle(x,y,z)
// f_agate(x,y,z)
}
*/
// dents
granite
//agate
//bumps
// wrinkles
//turbulence 0.1
octaves 640
scale 0.07
// poly_wave 1.5
pigment_map {
[0 rgbt <1,1,1,1>]
[0.4 rgbt <1,1,1,1>]
// [0.5 rgbt <1,1,1,1>]
[0.55 rgbt <1,1,1,0.2>*1.7]
[1 rgbt <0.0,0.0,0.0,0.0>]
}
scale 1000*300
}
finish {
diffuse 0.8
specular 0.0
ambient 0.25
refraction 1
reflection 0
}
}
double_illuminate
}
// moon halo ring 1
#declare h_red1=rgbt <1,0.9,0.9,1.0>;
- declare h_red2=rgbt <1,0.9,0.9,0.8>;
- declare h_white1=rgbt <1,1,1.0,1.0>;
- declare h_blue1=rgbt <0.9,0.9,1.0,1.0>;
// halo1
rainbow {
angle 22
width 5
distance 1.0e7
direction <0,0.5,1>
jitter 0.01
// up <0, 1, 0>
// arc_angle 360
falloff_angle 30
color_map {
[0.000 color h_red1]
[0.25 color h_red2]
[1 color h_blue1]
}
}
/*
// halo2
rainbow {
angle 46
width 5
distance 1.0e7
direction <0,0.5,1>
jitter 0.01
// up <0, 1, 0>
// arc_angle 360
falloff_angle 30
color_map {
[0.000 color h_red1]
[0.25 color h_red2]
[1 color h_blue1]
}
}
*/
- declare watertex1= texture
{
pigment { color rgb < 0.3, 0.3, 0.7 > }
normal { bumps 0.2 scale < .5, 0.25, 0.15 > }
finish { phong 1 reflection 1.0 ambient 0.2 diffuse 0.2 specular 1.0 }
}
- declare terra1=texture {
slope { -y*0.8 altitude y }
texture_map {
[0.01 watertex1 scale 0.01 ]
[0.02 pigment {Tan} normal {granite scale 0.01} finish {ambient 0}]
[0.19 pigment {Tan} normal {granite scale 0.01} finish {ambient 0}]
[0.83 pigment {Gray} normal {granite scale 0.01 } finish {ambient 0}]
}
// translate -0.05*z
}
#declare moss1= texture {
// pigment {checker color Green color <0,.6,0> scale 0.15}
pigment {
// color rgbt <124, 252, 0>/255
// color rgbt <138/255, 154/255, 91/255,0>/3
//wrinkles scale 0.1
// crackle turbulence 0.6
granite
scale 0.001
// turbulence 0.1
//color_map {
//[0 color rgbt <138/255, 154/255, 91/255,0>/3]
// [1 color rgbt <.5,.5,.5,0>/4 ]
//}
color_map {
[0 color rgbt <138/255, 154/255, 91/255,0>/3]
[1 color rgbt <124, 252, 0>/255 ]
}
}
normal {
//crackle turbulence 1 scale 0.01
//granite scale 0.03
spotted scale 0.003 bump_size 30
// agate
// wrinkles scale 0.1
bump_size 10
}
finish {specular 0}
}
- declare funk1= function {
// y+sin(x*10)*sin(z*3+x*2)*0.1
// y-sin (f_agate(x,0,z) )*0.1-f_granite(x*10,0,z*10)*0.05
// y-(f_agate(x*1,0,z*1)*0.5 )*f_wrinkles(x*5,0,z*5)*0.5
y-f_granite (x,0,z)*.6 *f_wrinkles(x,y,z)*1
// y-f_granite(x,0,z) *1
//y-f_agate(x,0,z)*0.5-f_wrinkles(x*200,0,z*200)*0.05
//y-f_crackle(x,0,z)*0.9
//y-f_wrinkles(x*18,0,z*18)*0.1
}
- declare surf1=object {
isosurface {
function {funk1(x,y,z)}
//accuracy 0.01
max_gradient 1
contained_by { box { -1, 1 } }
}
/*
height_field {
function 2000,2000 {
pigment { function {funk1(x,y,z)*1.5} rotate x*90 }
}
scale x*4
scale z*4
translate x*-2
translate z*-2
}
- /
texture {
//terra1
moss1
}
scale <5,1,5>
// scale y/5
}
plane {
y,0
/*
texture { pigment {
granite
color_map {
[0 color rgb Grey]
[0 color rgb Tan]
}
}
- /
texture {moss1}
//normal {agate bump_size 4 scale 10}
//}
}
//object {surf1}
- declare marker1=object {
//sphere {0,1}
cone {<0,0,0>,1/4,<0,1,0>,0.0001}
pigment {color Green}
finish {ambient 0}
scale 0.2
}
- macro tuft1(numm1)
- declare seed1=seed(1);
object {
intersection
{
union {
- for (nn,0,numm1)
- declare rr1=1;
- declare fii1=rand(seed1)*360;
- declare fii2=rand(seed1)*180;
- declare fii3=fii2+fii1;
- declare s1=rand(1)*0.5+0.75;
- declare rr2=s1*rr1;
//#if (fii2>90)
//#declare fii3=0;
//#end
object {
cone {<0,0,0>,0.02,<rr2,0,0>,0.0001 scale z/5}
texture {pigment {color rgbt <124, 252, 0>/255}}
rotate <0,fii1,fii3>
}
- end
}
box{<-1,0,-1>,<1,1,1>}
scale 0.1
}
}
- end // end macro
- macro vegetat2(number1, dimension1)
- declare seed1=seed(1);
- declare seed2=seed(2);
#declare quu1=1;
#declare qnum=44;
#declare halfdim1=dimension1/2 ;
#for (nn,0,number1)
#declare quu1=mod(quu1+1, qnum);
#declare x1=rand(seed1)*dimension1-halfdim1 ;
#declare z1=rand(seed1)*dimension1-halfdim1 ;
#declare y1=rand(seed1)*0.01 ;
#declare s1=0.3+rand(1)*1.5 ;
#declare roz1=rand(seed1)*20;
#declare rox1=rand(seed1)*20;
#declare roy1=rand(seed1)*360;
#declare objnum1=int(rand(seed1)*30);
#declare nor0 = <0, 0, 0>;
#declare loc0=<x1,10,z1>;
#declare loc1 = trace (surf1,loc0,-y, nor0 );
#if(objnum1>-1)
object {
cone {<0,0,0>,0.02,<0,1,0>,0.001}
texture {
pigment {color rgbt <124, 252, 0>/255}
}
scale 0.1
scale x*0.1
rotate z*roz1
rotate x*rox1
rotate y*roy1
translate loc1
// translate x*x1
// translate z*z1
}
#end
#end // loop
- end
#declare isograss1=object {
isosurface {
// function { grass_function_1(x,y,z)}
function { y-f_wrinkles(x*100,0,z*100)}
bounded_by {sphere {0,10}}
}
scale y/10
pigment
{
granite
turbulence 0.0
//poly_wave 2
color_map {
[0 color rgb <1,2,1>/2 ]
[1 color rgb <0,1,0>/3 ]
}
}
finish
{
//ambient 1
// phong 1.0
// reflection 0.2
}
}
#macro tree1(level, levels1)
#declare seed1=seed(1212);
#declare sk2=rand(seed1)*0.85+0.3;
- if((level)>levels1)
// sphere {0,0.2 pigment {color Green}}
//cone { <0,0,0>, 0.05, <0,1,0>, 0.0005 pigment {color rgb <10,72,30>/255 } scale 1}
// object { sphere {<0, 1, 0>, 1 scale 0.6 scale z/20 scale x/2 rotate y*45*rand(1) scale 1}
object {
merge {
cone { <0,1/2,0>, 0.8, <0,1.3,0>, 0.001 }
sphere {<0, 0, 0>, 1}
}
scale 0.6 scale z/20 scale x/2 rotate y*120*rand(seed1) scale 1
pigment {color rgbt <138/255, 154/255, 91/255,0>/7 }
}
// scale 0.9*sk2
- else
merge {
// cone {<0, 0, 0>,.045, <0, 1, 0>, .035 }
cone {<0, 0, 0.0>,.04, <0, 1/2+0.04, 0.04>, .035 }
cone {<0, 1/2-0.04, 0.04>,.035, <0, 1, 0>, .03 }
scale <2,1,2>
pigment {color <130,112,100>/255}
normal {granite scale 0.2 bump_size 3}
rotate y*rand(seed1)*180
}
//#declare level=level+1;
// sphere {0,0.2 pigment {color Red}}
union{
union { tree1(level+1, levels1)
rotate z*-60 *rand(1)
}
union { tree1(level+1, levels1)
rotate z*60 *rand(1)
}
union { tree1(level+1, levels1)
rotate x*-60 *rand(1)
}
union { tree1(level+1, levels1)
rotate x*60 *rand(1)
}
scale 0.8*sk2
translate y*0.95
}
- end
- end
#macro trees(number1, dimension1, depth1)
#declare seed1=seed(1212);
#declare number1=number1-1;
#declare quu1=1;
#declare qnum=44;
#declare halfdim1=dimension1/2 ;
#for (nn,0,number1)
#declare quu1=mod(quu1+1, qnum);
#declare x1=rand(seed1)*dimension1-halfdim1 ;
// #declare x1=rand(seed1)*dimension1+int(dimension1)*2;
#declare z1=rand(seed1)*dimension1-halfdim1 ;
#declare y1=rand(seed1)*0.01 ;
#declare s1=0.3+rand(seed1)*1.5 ;
#declare spacing1=0.3;
#declare roz1=rand(seed1)*360;
#declare rox1=+rand(seed1)*360;
#declare roy1=rand(seed1)*360;
#declare objnum1=int(rand(seed1)*30);
#declare between1=0.2;
#declare nor0 = <0, 0, 0>;
#declare loc0=<x1,10,z1> ;
#declare loc1 = trace (surf1,loc0,-y, nor0 );
#if(objnum1>-1)
// #if( loc1.y > 0.02 )
object {
// marker1
// translate pos1
union {tree1(0,depth1) scale 1 }
translate loc1
rotate y*roy1
translate y*-0.0
// translate x*2
scale 0.5
// scale x*0.1
}
#end
#end // loop
- end
// #end
object {upclouds1 }
//object {middleclouds1}
object {lowclouds1}
object {surf1}
object {isograss1}
//vegetat2 (3000,2)
union { trees(2,5, 7) translate x*0.15 translate z*-0.5 translate y*-0.03}
Licensing[edit]
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 06:32, 3 August 2023 | 1,600 × 1,200 (1.49 MB) | Merikanto (talk | contribs) | Update | |
15:32, 2 August 2023 | 1,600 × 1,200 (1.4 MB) | Merikanto (talk | contribs) | Update of code | ||
13:17, 31 July 2023 | 1,600 × 1,200 (1.41 MB) | Merikanto (talk | contribs) | Code | ||
09:01, 31 July 2023 | 1,600 × 1,200 (1.85 MB) | Merikanto (talk | contribs) | Update | ||
08:31, 31 July 2023 | 1,600 × 1,200 (1.7 MB) | Merikanto (talk | contribs) | |||
11:14, 30 July 2023 | 1,600 × 1,200 (1.29 MB) | Merikanto (talk | contribs) | Uploaded own work with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
PNG file comment |
|
---|---|
File change date and time | 06:18, 3 August 2023 |
Software used |