POV-Ray : Newsgroups : povray.binaries.images : Playing with Monsters : Re: Playing with Monsters Server Time
6 Nov 2024 00:27:03 EST (-0500)
  Re: Playing with Monsters  
From: Norbert Kern
Date: 3 Jul 2006 06:10:01
Message: <web.44a8ec985c8cac3ac398b7380@news.povray.org>
Hi,

I came up with this solution. Hope it helps.
Don't know, why my rotation tip failed - but Warp's hint works always albeit
being less flexible.

//______________________

#version 3.6;
#declare RAD = 2;
global_settings {
        assumed_gamma 2.2
        max_trace_level 16
        noise_generator 2
        radiosity {
                pretrace_start 0.08
                pretrace_end   0.04/RAD
                count 30*RAD
                nearest_count RAD
                error_bound 2/RAD
                low_error_factor 0.5
                recursion_limit 1
                gray_threshold 0
                minimum_reuse 0.015
                brightness 2.3
                adc_bailout 0.005
                normal on
                media off
        }
}
camera {
        location <0,6,-30>
        right x*image_width/image_height
        up y
        look_at 0
        angle 67
}
light_source {
        <80000,150000,-5000>,
        <2.42,2.23,1.87>
}
sky_sphere {
        pigment {
                gradient y
                color_map {
                        [0 color <212,221,239>/255]
                        [1 color < 79,103,170>/255]
                }
        }
}
plane {
        y,-50 hollow
        texture {
                pigment {color rgb <0.2,0.3,0.1>}
        }

}
//______________________________________________________________________________

#include "functions.inc"
#include "transforms.inc"

#declare eye = cylinder {0,y*2,0.4 pigment {color rgb 0.4} finish {ambient
0}}

#declare BSB = sphere {0, 11 scale <1, 0.85, 1>};
#declare Norm = <0,0,0>;
#declare CntX = -90;
#declare CntY = -90;
#declare ZZ = <0,0,-1>;
#declare N1 = seed(12345);

#macro RRand (a,b,c)
        rand (c)*(b-a)+a
#end

#while(CntY < 90)
        #while(CntX < 90)
                #declare POSB = trace(BSB, <CntX, CntY + RRand(-0.95, 0.95,
N1), 0>, ZZ, Norm);
                #if (vlength (Norm)!= 0)
                merge {
                        object {eye}
                        sphere{<0,0,0.55-0.55>, 0.75
                                texture{pigment{rgb <1, .9, .9>}}
                                scale <1.3, 1.3, 0.95>
                        }
                        rotate <RRand(-20, 20, N1), RRand(-20, 20, N1), 0>
                        Reorient_Trans (y,Norm)
                        translate POSB
                }
                #end
                #declare CntX = CntX + 3 + RRand(-0.55, 0.55, N1);
        #end
        #declare CntX = -90;
        #declare CntY = CntY + 2;
#end

object {BSB pigment {color rgb <1,0,0>} finish {ambient 0}}

//________________________________________________________________


Post a reply to this message


Attachments:
Download 'rotation_issue.jpg' (65 KB)

Preview of image 'rotation_issue.jpg'
rotation_issue.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.