|
|
To get you started:
--------------------------------------
#version 3.8;
#include "colors.inc"
camera {
right x*image_width/image_height
up y
sky y
direction z
location <0.0, 0, -5.0>
look_at <0.0, 0, 0.0 >
}
light_source {<5, 0, -50> color White}
sky_sphere {pigment {Black}}
// code adapted from:
//
https://forum.unity.com/threads/distributing-empty-gameobjects-evenly-on-a-sphere.215479/
#declare SR = 0.05;
#declare Trimers = 512;
#declare N = 1024*2;
#declare dlong = pi*(3-sqrt(5)); //~2.39996323
#declare dz = 2/N;
#declare long = 0;
#declare Z = 1 - dz/2;
#declare COVID_19 = union {
#for (k, 0, N-1)
#local r = sqrt(1-Z*Z);
#local Loc = <cos(long)*r, sin(long)*r, Z>;
sphere {Loc SR texture {pigment {White} finish {specular 0.4}} }
#local T = k/int(N/Trimers);
#if (T = int (T))
cone {Loc, 0, Loc*1.2, SR texture {pigment {Red} finish {specular 0.05}} }
#end
#local Z = Z - dz;
#local long = long + dlong;
#end
}
#object {COVID_19 rotate x*90}
Post a reply to this message
|
|