POV-Ray : Newsgroups : povray.general : wanted: coronavirus : Re: wanted: coronavirus Server Time
2 Jul 2025 11:56:46 EDT (-0400)
  Re: wanted: coronavirus  
From: Bald Eagle
Date: 10 Mar 2020 15:00:02
Message: <web.5e67e3ab8df84f6a4eec112d0@news.povray.org>
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

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