#declare Values = array[17] {0.1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 20 } /* Poměrně primitivní příklad generátoru sloupcových grafu. Hodnoty lze zadávat od 0 do 20 a nemusí to být nutně celá čísla Sloupců je 22 od kraje do kraje při 16:9 poměru stran výsledného obrazu. Číslo v hranatých závorkách musí udávat počet hodnot. */ #declare Radiosity=1; // nebo 0 pro zapnuté nebo vypnuté vyzařování ( Radiosity - metoda výpočtu scény ) //------------------------------------------------------------------------- // níže uvedená nastavení měňte jen za předpokladu, že rozumíte skriptovací mu jazyku POV-Ray #version 3.6; global_settings { assumed_gamma 1.8 max_trace_level 15 adc_bailout 0 } #if (Radiosity=1) global_settings { radiosity { pretrace_start 0.08 pretrace_end 0.04 count 35 nearest_count 5 error_bound 1.8 recursion_limit 3 low_error_factor .5 gray_threshold 0.0 minimum_reuse 0.015 brightness 1 adc_bailout 0.01/2 } } #end #include "shapes.inc" camera { location <0.0, 0, -4.0> direction 1.5*z right x*image_width/image_height look_at <0.0, 0.0, 0.0> } light_source { 0*x color rgb 1.0 area_light <30, 0, 0> <0, 0, 30> 14, 14 adaptive 1 jitter circular orient translate <-5, 180, -80> } light_source { 0*x color rgb 1.0 area_light <30, 0, 0> <0, 0, 30> 14, 14 adaptive 1 jitter circular orient translate <-5, 0, -80> } // ---------------------------------------- plane { y, -0.9999 texture { pigment { color rgb <1.0,1.0,1.0> } normal { wrinkles .5 scale .01 } } hollow } plane { z, 1 texture { pigment { color rgb <1.0,1.0,1.0>/2 } normal { wrinkles .5 scale .01 } } hollow } union { #declare Count=0; #while ( Count0) #declare prvek=Round_Cylinder(0*y, y*(0.001+Values[Count]), 1, 0.2-(0.2*(Values[Count]<0.2))+-(0.05*(Values[Count]<0.2)) , 0); #else #declare prvek=Round_Cylinder(0*y, y*(0.001+Values[Count]), 1, 0, 0); #end object { prvek scale .1 translate <-2+(Count/4),-1,0> } #declare Count=Count+1; #end texture { pigment { gradient y color_map { [ 0.0 color rgb <1.0,1.0,1.0> ] [ 0.5 color rgb <1.0,0.3,0.3> ] [ 1.0 color rgb <1.0,0.0,0.0> ] } scale <1,2,1> translate <0,1.01,0> } finish { phong 0.9 phong_size 160 } } }