|
|
Anyone like patterns? I do, so I thought I'd share this discovery.
The isosurface function from
http://www.interq.or.jp/blue/kawashu/gallery/unofficial.html provides an
endless variety of patterns by changing the A and B constants. Below is the
source code for the image.
Enjoy, Janet
parrotdolphin.deviantart.com
#include "metals.inc"
#include "golds.inc"
#include "colors.inc"
#include "textures.inc"
global_settings {
assumed_gamma 2
irid_wavelength rgb <0.25,0.14,0.18> //default = rgb <0.25,0.18,0.14>
}
//CAMERA
camera {location <0, 0, -215>
right x*image_width/image_height
look_at <0,0,0>}
//LIGHTS
light_source { <0,0,-60> White }
light_source { <-60,60,-60> White }
#declare PHI = 1.61803399; //the Golden Section
#declare A = pi;
#declare B = PHI;
//Original from http://www.interq.or.jp/blue/kawashu/gallery/unofficial.html
A=3,B=2
#declare Func = function {
cos(x) * cos(z) + cos((sqrt(A)*x-z)/B) *
cos((x+sqrt(A)*z)/B) + cos((sqrt(A)*x+z)/B) *
cos((x-sqrt(A)*z)/B) }
#declare Pig = pigment { function { Func(x,y,z) }
color_map {
[ .142857 color rgb<71/256,61/256,119/256> ]
[ .142857*2 color rgb<112/256,50/256,60/256> ]
[ .142857*3 color rgb<164/256,122/256,27/256> ]
[ .142857*4 color rgb<200/256,130/256,77/256> ]
[ .142857*5 color rgb<164/256,122/256,27/256> ]
[ .142857*6 color rgb<112/256,50/256,60/256> ]
[ 1.0 color rgb<71/256,61/256,119/256> ]
} }
//ISOTHINGS
#declare IsoThingS = isosurface { function { Func(x,y,z) }
contained_by { sphere { 0, 50 } }
accuracy 0.001
texture { T_Gold_3C}
finish {ambient .4 irid { .35 thickness .5 turbulence .2 }}
// pigment { Pig }
// finish {ambient .3 metallic reflection .3 }
rotate <90,0,90>
}
#declare IsoThingB = isosurface { function { Func(x,y,z) }
contained_by { box {<-100,1,-100>, <100,0,100>} }
accuracy 0.001
texture { T_Gold_3C}
finish {ambient .4 irid { .35 thickness .5 turbulence .2 }}
// pigment { Pig }
// finish {ambient .3 metallic reflection .3 }
rotate <90,0,90>
}
object { IsoThingS }
object { IsoThingB }
//SKY
sky_sphere {
pigment {
agate
color_map {
[ 0.5 color red 0 green 0 blue .1 ]
[ 1.0 color red .15 green .15 blue .3 ]
}
turbulence .125
scale 6
rotate < 0, 0, 25 >
} }
Post a reply to this message
Attachments:
Download 'isosurface2-a.jpg' (337 KB)
Preview of image 'isosurface2-a.jpg'
|
|