POV-Ray : Newsgroups : povray.general : wanted: coronavirus Server Time
28 Mar 2024 09:29:50 EDT (-0400)
  wanted: coronavirus (Message 1 to 10 of 10)  
From: jr
Subject: wanted: coronavirus
Date: 10 Mar 2020 06:35:01
Message: <web.5e676cebc2c0c724451952ca0@news.povray.org>
hi,

looking for a coronavirus (not the real thing, you understand :-)).  I did some
googling but could only find non-free ones, mostly for 3D printing it seems.
does anyone have a mesh or macro to make one?


regards, jr.


Post a reply to this message

From: Bald Eagle
Subject: Re: wanted: coronavirus
Date: 10 Mar 2020 14:00:00
Message: <web.5e67d5338df84f6a4eec112d0@news.povray.org>
I actually looked around a while back, and searching for "spiky spheres" and the
like led me on a few interesting tangents, but I didn't find anything concrete.

All of the different "cartoon" models I've seen vary widely in appearance, so if
you're looking to do something like that, I'd say why not use one of the recent
golf ball models to locate some inverted cone shapes around a sphere and then
use a noisy sphere isosurface as the center, or a ton of spheres placed with

#include "rand.inc"
#declare Stream = seed (123);
#declare Variable = VRand_On_Sphere(Stream);

--------------------------------------------------------------------------


The Korkin Lab put together some models of the coronavirus protein pieces:
https://www.biorxiv.org/content/10.1101/2020.02.10.942136v1.full.pdf

along with a 9.5 MB zip.  I know that some folks use POV-Ray to render protein
data bank files (pdb)...    I know, I know - orders of magnitude more
complicated than what you're looking for, but just posting for reference in case
someone ambitious wanted to investigate further.  ;)


Post a reply to this message

From: Bald Eagle
Subject: Re: wanted: coronavirus
Date: 10 Mar 2020 14:20:00
Message: <web.5e67d92d8df84f6a4eec112d0@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:

> does anyone have a mesh or macro to make one?

A creepy project from 2006.  :D

http://news.povray.org/povray.binaries.images/thread/%3C44a74506%40news.povray.org%3E/?mtop=15


Post a reply to this message

From: Bald Eagle
Subject: Re: wanted: coronavirus
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

From: jr
Subject: Re: wanted: coronavirus
Date: 10 Mar 2020 18:05:00
Message: <web.5e680e1f8df84f6a451952ca0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> To get you started:

hey, thanks!  does look like a good start[*].  now wondering how to make cones a
little more valve-stem shape :-), SOR or lathe.

the "creepy project" thread looks v interesting too, will need to read through
it later, properly.


regards, jr.

[*] the colour choice makes it look not too dissimilar from the stock photo the
BBC has been using.


Post a reply to this message

From: Bald Eagle
Subject: Re: wanted: coronavirus
Date: 10 Mar 2020 19:30:01
Message: <web.5e6822438df84f6a4eec112d0@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:

> hey, thanks!  does look like a good start[*].  now wondering how to make cones a
> little more valve-stem shape :-), SOR or lathe.

http://news.povray.org/povray.binaries.images/message/%3Cweb.5e67f167b0bd80624eec112d0%40news.povray.org%3E/#%3Cweb.5e6
7f167b0bd80624eec112d0%40news.povray.org%3E


Well, you could do one of those, or just append a flattened sphere onto the end
of the cone.

You could also go with:
http://www.f-lohmueller.de/pov_tut/all_shapes/shapes3_70e.htm
or
http://www.f-lohmueller.de/pov_tut/objects/obj_350e.htm
or an isosurface with non-linear scaling
(like I did with the vortex)
http://www.econym.demon.co.uk/isotut/substitute.htm
or something like what I did here:
http://news.povray.org/povray.binaries.images/thread/%3Cweb.5a31dcc89a8d03875cafe28e0%40news.povray.org%3E/?ttop=429971
&toff=300

The key with any of those would be that you'd have to define a base object
(likely at the y-axis pole) and then _rotate_ that into position.

IIRC, the "spikes" are trimers, and then there are some kind of smaller pentamer
pores on the surface of the protein capsule.


Post a reply to this message

From: Bald Eagle
Subject: Re: wanted: coronavirus
Date: 11 Mar 2020 19:50:00
Message: <web.5e69787a8df84f6a4eec112d0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> The key with any of those would be that you'd have to define a base object
> (likely at the y-axis pole) and then _rotate_ that into position.

So, I took a look into doing just that and am getting some very odd results.
Converting the Cartesian into spherical coordinates and then rotating around z,
then -y, I DO get a sphere --- but it's shifted in the +x direction.
How that happens when I'm supposedly rotating around the origin...
And it seems "radius" dependent.  The farther I locate my original test sphere
in the +x direction, the farther the whole spherical shell shifts.
And the radius of the spherical shell seems to be about half that resulting from
the original algorithm.



#declare SR = 0.05;
#declare Pentamers = 360*1.5;
#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 Spike = 1.5;

#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 {Yellow/4} finish {specular 0.1}} }
 #local T = k/int(N/Trimers);
 #if (T = int (T))
  cone {Loc, 0, Loc*Spike, SR texture {pigment {Red} finish {specular 0.05}} }
  sphere {Loc*Spike, SR texture {pigment {Red} finish {specular 0.05}} }
  #local RZ = atan2( sin(long)*r, vlength (<cos(long)*r, 0, Z>) );
  #local RY = atan2(Z, cos(long)*r);
  sphere {<cos(long)*r*Spike*2, 0, 0> SR texture {pigment {Magenta} finish
{specular 0.05}}
   rotate  z*degrees(RZ)
   rotate -y*degrees(RY)

  }
 #end
 #local P = k/int(N/Pentamers);
 #if (P = int (P))
  sphere {Loc*1.05, SR texture {pigment {Green/4} normal {bumps 1 scale 0.005}
finish {specular 0.1}} }
 #end
    #local Z = Z - dz;
    #local long = long + dlong;
#end
}


Post a reply to this message

From: Bald Eagle
Subject: Re: wanted: coronavirus
Date: 11 Mar 2020 20:10:00
Message: <web.5e697d418df84f6a4eec112d0@news.povray.org>
It's just me being mentally challenged.

But I AM curious if anyone else can spot the problem.


Post a reply to this message

From: jr
Subject: Re: wanted: coronavirus
Date: 12 Mar 2020 05:05:00
Message: <web.5e69fa048df84f6a451952ca0@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> It's just me being mentally challenged.
>
> But I AM curious if anyone else can spot the problem.

cut + paste the code you posted.  added '#version', 'global_settings', and
'#include' for colour.  getting a parse warning "no objects in scene", and no
visible object(s).  no idea why, the '#for' loop looks kosher.


regards, jr.


Post a reply to this message

From: jr
Subject: Re: wanted: coronavirus
Date: 12 Mar 2020 05:20:00
Message: <web.5e69fda08df84f6a451952ca0@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > It's just me being mentally challenged.
> >
> > But I AM curious if anyone else can spot the problem.
>
> cut + paste the code you posted.  added '#version', 'global_settings', and
> '#include' for colour.  getting a parse warning "no objects in scene", and no
> visible object(s).  no idea why, the '#for' loop looks kosher.

d'oh..  belay that, the 'object {COVID_19}' is missing.  still, whether with or
without same rotation as previous code, nothing visible.


regards, jr.


Post a reply to this message

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