POV Ray 3.7 code //==================================================== // 3D Heart shape generation by random cells // of smooth triangles (POV-Ray 3.7 code) //==================================================== #include "heartPoints" #version 3.7 global_settings {assumed_gamma 1.0} camera { location <0, 0, -10.0> direction <0.0, 0.0, 1.0> up <0.0, 1.0, 0.0> right <1.33333, 0.0, 0.0> look_at <0, -1, 0> } light_source { < 7, 0, -40> rgb <1.000000, 1.000000, 1.000000> * 1.0 fade_distance 3 fade_power 0.3 } light_source{ <0,0,0> color rgb<1,1,1> area_light <5, 0, 0> <0, 0, 5> 6,6 // numbers in directions adaptive 1 // 0,1,2,3... jitter // random softening }//---- end of area_light #declare st = 1; #declare n = 100; #declare N = 1647; #declare Rnd_1 = seed (1153); #declare Rnd_2 = seed (553); #declare Rnd_3 = seed (876); union{ #for(j,0,256*N,1) // steps N/6 N/3 N 4*N 16*N 256*N #declare i = int(N*rand(Rnd_1)); #declare p = int(n*rand(Rnd_2)); #declare q = int(p*rand(Rnd_3)); #declare X = a[i][3] - (a[i][3] - a[i][0])*p/n + (a[i][6] - a[i][0])*q/n; #declare Y = a[i][4] - (a[i][4] - a[i][1])*p/n + (a[i][7] - a[i][1])*q/n; #declare Z = a[i][5] - (a[i][5] - a[i][2])*p/n + (a[i][8] - a[i][2])*q/n; sphere { < X, Y, Z >, 0.05 texture{ pigment{color < 1.0, 0.3, 0.2 > } finish { ambient rgb <0.3,0.1,0.1> diffuse 0.3 reflection 0.0 specular 0.0}} rotate <-90, 180, 0> # rotate 0*clock*360 // uncheck for animation translate <0, -3, 0>} #end} // j \end{verbatim}}