- // POV-Ray 3.7 Scene File " ... .pov"
- // author: ... alij
- // date: ...
- //--------------------------------------------------------------------------
- //Sources
- //Information on Quaternion Julia Fractals and my initial starting point using his q.pov
- //file
- //http://paulbourke.net/fractals/quatjulia/
- //PovRay Julia Fractal help - http://www.povray.org/documentation/view/3.7.0/280/
- //and http://www.math.technion.ac.il/Site/computing/docs/povray/pov243.html more detailed
- //information on PovRay Julia Fractal funtions
- //http://www.youtube.com/watch?v=nhhBWge1KBk - video by bdchambers79
- //showing coordinate animation Cycling through the Julia parameters.
- //May be useful for pinning down shape you want to use.
- //In current state this file is to render two groups of Julia Fractals side by side
- //sliced to reveal structure at different iterations and one group using the
- //"sqr" cacluation and the other "cube" - to compare difference while using the same
- //4D_Julia_Parameters
- //Excuse my messy code style hopefully you will be able to get this to run on your system
- //without too many issues - I think the Povray include files are all standard. you may need to
- //comment out the hdri section or add your own hdri skymap.
- //--------------------------------------------------------------------------
- #version 3.7;
- global_settings{ assumed_gamma 1.0 }
- #default{ finish{ ambient 0.1 diffuse 0.9 }}
- //--------------------------------------------------------------------------
- #include "colors.inc"
- #include "textures.inc"
- #include "glass.inc"
- #include "metals.inc"
- #include "golds.inc"
- #include "stones.inc"
- #include "woods.inc"
- #include "shapes.inc"
- #include "shapes2.inc"
- #include "functions.inc"
- #include "math.inc"
- #include "transforms.inc"
- // Quaternion variables - 4D_Julia_Parameter
- // Rotation of the two groups - and positioning.
- // Iteration count is in the code for each instance
- #declare ConstC = <-0.187,0.74,-0.03,-0.752>;
- #declare ConstD = <-0.087,0.84,-0.03,-0.452>;
- #declare ConstE = <-0.01,0.84,-0.40,-0.5965>;
- #declare SLICEDIST = 0.01;
- //rotate groups
- #declare ConstROT1 = <0,0,0>;
- #declare ConstROT2 = <90,90,90>;
- //translate groups // Note you may need to adjust the clipping planes in relation to any tranformations
- #declare ConstTRANS1 = <0,1.1,0.0>;
- #declare ConstTRANS2 = <-0,1.1,-1.4>;
- //scale groups
- #declare ConstScale1 = <-0.85,0.85,0.85>;
- #declare ConstScale2 = <-0.75,0.75,0.75>;
- //////////////////////////////////////////////
- #declare Use_Radiosity = 1;
- #declare Soft_Shadows = 0;
- global_settings {
- #ifdef (Use_Radiosity)
- radiosity { }
- #end }
- ///////////////////
- // comment out hdri - or suppy your own .hdr image // source http://www.pauldebevec.com/Probes/
- //hdri environment -------------------------
- sky_sphere{
- pigment{
- image_map{ hdr "/home/ali/POV-Ray/hdri/rnl_probe.hdr"
- gamma 0.2
- map_type 0 interpolate 2}
- }// end pigment
- rotate <0,40,0>
- }
- // end sky_sphere with hdr image -----------
- /////////////////
- /* sky_sphere {
- pigment {
- gradient y
- color_map {
- [0 color SlateBlue ]
- [1 color Silver] }
- scale 1
- translate -2
- }
- }
- */
- ////Comment in-out which texture styly you want - metal slow - color fast//////
- #declare texture_1 = texture { T_Brass_1D }
- #declare texture_2 = texture { T_Silver_1A }
- /*#declare texture_1 =
- texture {
- pigment { color Red }
- }
- #declare texture_2 =
- texture {
- pigment { color Green }
- } */
- //--------------------------------------------------------------------------
- // camera ------------------------------------------------------------------
- #declare Camera_0 = camera { angle 75 // front view
- location <2.5 ,1 ,-1>
- right x*image_width/image_height
- look_at <-30 , 2 , 4>}
- #declare Camera_1 = camera {/*ultra_wide_angle*/ angle 90 // diagonal view
- location <2.0 , 0. ,-0.2>
- right x*image_width/image_height
- look_at <0.0 , 1.0 , -1.0>
- }
- #declare Camera_2 = camera {perspective angle 75 //right side view
- location <3.0 , 1.0 , 0.0>
- right x*image_width/image_height
- look_at <0.0 , 1.0 , 0.0>}
- #declare Camera_3 = camera {/*ultra_wide_angle*/ angle 90 // top view
- location <0.0 , 5.0 ,-0.001>
- right x*image_width/image_height
- look_at <0.0 , 1.0 , 0.0>}
- camera{Camera_0}
- // sun ----------------------------------------------------------------------
- light_source{
- < 500,700,-700> color White
- area_light <8, 0, 0>, <0, 8, 0>, 17, 17
- adaptive 1
- jitter
- fade_distance 1.10
- fade_power 1.10
- //shadowless
- }
- // sky ----------------------------------------------------------------------
- //background {
- // color Blue }
- //sky_sphere {
- // pigment {
- // gradient y
- // color_map {
- // [0 color CornflowerBlue]
- // [1 color Silver]
- // }
- // scale 2
- // translate -2
- // }
- // }
- // ground -------------------------------------------------------------------
- /*plane{ <0,1,0>, 0
- //texture{ Polished_Chrome
- // normal{ bumps 0.25 scale <0.25,0.25,0.25>*0.5 turbulence 0.04 }
- // finish{ reflection 0.10 }}}
- finish{ reflection 0.0 }
- pigment { color White }}
- // end of plane */
- //---------------------------------------------------------------------------
- //---------------------------- objects in scene ----------------------------
- //---------------------------------------------------------------------------
- // THIS SECTION - sqr
- julia_fractal {
- ConstE
- quaternion
- sqr
- max_iteration 4
- precision 900
- slice <0,0,0,1> SLICEDIST
- texture { texture_1 }
- scale ConstScale1
- rotate ConstROT1
- translate ConstTRANS1
- clipped_by { plane { <0, 1, 0>, 0.25
- rotate<90,210,1>
- scale<-0.1,0.1,0.1>
- translate<0.5,0,0>
- }
- }
- }
- julia_fractal {
- ConstE
- quaternion
- sqr
- max_iteration 5
- precision 900
- slice <0,0,0,1> SLICEDIST
- texture { texture_2 }
- scale ConstScale1
- rotate ConstROT1
- translate ConstTRANS1
- clipped_by { plane { <0, 1, 0>, 0.25
- rotate<90,210,1>
- scale<-0.1,0.1,0.1>
- translate<0.5,0,0>
- }
- }
- }
- julia_fractal {
- ConstE
- quaternion
- sqr
- max_iteration 6
- precision 900
- slice <0,0,0,1> SLICEDIST
- texture { texture_1 }
- scale ConstScale1
- rotate ConstROT1
- translate ConstTRANS1
- clipped_by { plane { <0, 1, 0>, 0.25
- rotate<90,210,1>
- scale<-0.1,0.1,0.1>
- translate<0.5,0,0>
- }
- }
- }
- julia_fractal {
- ConstE
- quaternion
- sqr
- max_iteration 7
- precision 900
- slice <0,0,0,1> SLICEDIST
- texture { texture_2 }
- scale ConstScale1
- rotate ConstROT1
- translate ConstTRANS1
- clipped_by { plane { <0, 1, 0>, 0.25
- rotate<90,210,1>
- scale<-0.1,0.1,0.1>
- translate<0.5,0,0>
- }
- }
- }
- julia_fractal {
- ConstE
- quaternion
- sqr
- max_iteration 8
- precision 900
- slice <0,0,0,1> SLICEDIST
- texture { texture_1 }
- scale ConstScale1
- rotate ConstROT1
- translate ConstTRANS1
- clipped_by { plane { <0, 1, 0>, 0.25
- rotate<90,210,1>
- scale<-0.1,0.1,0.1>
- translate<0.5,0,0>
- }
- }
- }
- julia_fractal {
- ConstE
- quaternion
- sqr
- max_iteration 9
- precision 900
- slice <0,0,0,1> SLICEDIST
- texture { texture_2 }
- scale ConstScale1
- rotate ConstROT1
- translate ConstTRANS1
- clipped_by { plane { <0, 1, 0>, 0.25
- rotate<90,210,1>
- scale<-0.1,0.1,0.1>
- translate<0.5,0,0>
- }
- }
- }
- julia_fractal {
- ConstE
- quaternion
- sqr
- max_iteration 10
- precision 900
- slice <0,0,0,1> SLICEDIST
- texture { texture_1 }
- scale ConstScale1
- rotate ConstROT1
- translate ConstTRANS1
- //Commented out clipping plane to show full uncut quaternion
- // clipped_by { plane { <0, 1, 0>, 0.25
- // rotate<90,210,1>
- // scale<-0.1,0.1,0.1>
- // translate<0.5,0,0>
- // }
- // }
- }
- /////////////////////////////////////////////////////////////////////////////
- // cube - calculation
- julia_fractal {
- ConstE
- quaternion
- cube
- max_iteration 4
- precision 900
- slice <0,0,0,1> SLICEDIST
- texture { texture_1 }
- scale ConstScale2
- rotate ConstROT2
- translate ConstTRANS2
- clipped_by { plane { <0, 1, 0>, 0.25
- rotate<0,0,9>
- scale<-0.1,0.1,0.1>
- translate<0,0.5,0> }
- }
- }
- julia_fractal {
- ConstE
- quaternion
- cube
- max_iteration 5
- precision 900
- slice <0,0,0,1> SLICEDIST
- texture { texture_2 }
- scale ConstScale2
- rotate ConstROT2
- translate ConstTRANS2
- clipped_by { plane { <0, 1, 0>, 0.25
- rotate<0,0,9>
- scale<-0.1,0.1,0.1>
- translate<0,0.6,0> }
- }
- }
- julia_fractal {
- ConstE
- quaternion
- cube
- max_iteration 6
- precision 900
- slice <0,0,0,1> SLICEDIST
- texture { texture_1 }
- scale ConstScale2
- rotate ConstROT2
- translate ConstTRANS2
- clipped_by { plane { <0, 1, 0>, 0.25
- rotate<0,0,9>
- scale<-0.1,0.1,0.1>
- translate<0,0.7,0> }
- }
- }
- julia_fractal {
- ConstE
- quaternion
- cube
- max_iteration 7
- precision 900
- slice <0,0,0,1> SLICEDIST
- texture { texture_2 }
- scale ConstScale2
- rotate ConstROT2
- translate ConstTRANS2
- clipped_by { plane { <0, 1, 0>, 0.25
- rotate<0,0,9>
- scale<-0.1,0.1,0.1>
- translate<0,0.8,0> }
- }
- }
- julia_fractal {
- ConstE
- quaternion
- cube
- max_iteration 8
- precision 900
- slice <0,0,0,1> SLICEDIST
- texture { texture_1 }
- scale ConstScale2
- rotate ConstROT2
- translate ConstTRANS2
- clipped_by { plane { <0, 1, 0>, 0.25
- rotate<0,0,9>
- scale<-0.1,0.1,0.1>
- translate<0,0.9,0> }
- }
- }
- julia_fractal {
- ConstE
- quaternion
- cube
- max_iteration 9
- precision 900
- slice <0,0,0,1> SLICEDIST
- texture { texture_2 }
- scale ConstScale2
- rotate ConstROT2
- translate ConstTRANS2
- clipped_by { plane { <0, 1, 0>, 0.25
- rotate<0,0,9>
- scale<-0.1,0.1,0.1>
- translate<0,1.0,0> }
- }
- }
- julia_fractal {
- ConstE
- quaternion
- cube
- max_iteration 10
- precision 900
- slice <0,0,0,1> SLICEDIST
- texture { texture_1 }
- scale ConstScale2
- rotate ConstROT2
- translate ConstTRANS2
- clipped_by { plane { <0, 1, 0>, 0.25
- rotate<0,0,9>
- scale<-0.1,0.1,0.1>
- translate<0,1.1,0> }
- }
- }
- julia_fractal {
- ConstE
- quaternion
- cube
- max_iteration 10
- precision 900
- slice <0,0,0,1> SLICEDIST
- texture { texture_1 }
- scale ConstScale2
- rotate ConstROT2
- translate ConstTRANS2
- //Commented out clipping plane to show full uncut quaternion
- // clipped_by { plane { <0, 1, 0>, 0.25
- // rotate<0,0,9>
- // scale<-0.1,0.1,0.1>
- // translate<0,1.1,0> }
- // }
- }
- // plane { <0, 1, 0>, 0.25
- // rotate<0,0,0>
- // scale<-0.1,0.1,0.1>
- // translate<0,0.5,0> }
- plane { <0, 1, 0>, 0.25
- texture {pigment { color White }}
- rotate<90,90,0>
- scale<-0.1,0.1,0.1>
- translate<-120,0,0> }
SHARE
TWEET
Quaternion-sqr-cube-slice-povray.pov
a guest
Sep 17th, 2013
62
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

