POV-Ray : Newsgroups : povray.binaries.images : blood Server Time
4 Oct 2024 19:19:51 EDT (-0400)
  blood (Message 1 to 7 of 7)  
From: portelli
Subject: blood
Date: 21 Feb 1999 23:11:57
Message: <36D104CE.C5CC3FDE@pilot.msu.edu>
I'm trying to make a blood cell and I am not very successful.  First I
tried using a circle of blobs, using a while loop.  I worked sort of,
but not good enough.  I'm not to good with splines but I'm going to try
and do that.  Here is my blob code:

#declare b = 0;
blob
{
        threshold .6
        #while ( b<20)
                sphere { < .6, 0, 0> .55, 1 rotate <0, b/20*360, 0> }   
               // sphere { < 0, 0, 0> .3, 2 }                 
                
                #declare b = b+1;
        #end
        pigment { color Red }  
        rotate <-40, 0, 0> 
}
The second sphere does not appear to add  to the blob.   Why?


Post a reply to this message

From: Bob Hughes
Subject: Re: blood
Date: 22 Feb 1999 00:59:32
Message: <36D0F22D.62B9BD13@aol.com>
CSG might be better, easier.

union {
torus {1,.5}
sphere {<0,1,0>,.75 scale <1.5,1,1.5> clipped_by {plane {y,.45}}}
sphere {<0,-1,0>,.75 scale <1.5,1,1.5> clipped_by {plane {-y,.45}}}
 pigment {rgb<1,0,0>}
   rotate <-30,15,0>
}

This is a rough sketch, tweaking may be needed.


portelli wrote:
> 
>         I'm trying to make a blood cell and I am not very successful.  First I
> tried using a circle of blobs, using a while loop.  I worked sort of,
> but not good enough.  I'm not to good with splines but I'm going to try
> and do that.  Here is my blob code:
> 
> #declare b = 0;
> blob
> {
>         threshold .6
>         #while ( b<20)
>                 sphere { < .6, 0, 0> .55, 1 rotate <0, b/20*360, 0> }
>                // sphere { < 0, 0, 0> .3, 2 }
> 
>                 #declare b = b+1;
>         #end
>         pigment { color Red }
>         rotate <-40, 0, 0>
> }
> The second sphere does not appear to add  to the blob.   Why?

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.htm
 mailto:inv### [at] aolcom?PoV


Post a reply to this message

From: Marc Schimmler
Subject: Re: blood
Date: 22 Feb 1999 05:09:24
Message: <36D12CD0.2EE625CF@ica.uni-stuttgart.de>
portelli wrote:
> 
>         I'm trying to make a blood cell and I am not very successful.  First I
> tried using a circle of blobs, using a while loop.  I worked sort of,
> but not good enough.  I'm not to good with splines but I'm going to try
> and do that. 

Just a quick try to it with splines. Maybe this is what you are looking
for (You looking for the red ones, right?). Excuse the bad texturing.

Marc
-- 
Marc Schimmler


Post a reply to this message


Attachments:
Download 'blood.jpg' (37 KB) Download 'us-ascii' (1 KB)

Preview of image 'blood.jpg'
blood.jpg

From: portelli
Subject: Re: blood
Date: 22 Feb 1999 14:48:17
Message: <36D1E050.EB20985B@pilot.msu.edu>
Yea thats it.  I need to learn splines.

Marc Schimmler wrote:
> 
> portelli wrote:
> >
> >         I'm trying to make a blood cell and I am not very successful.  First I
> > tried using a circle of blobs, using a while loop.  I worked sort of,
> > but not good enough.  I'm not to good with splines but I'm going to try
> > and do that.
> 
> Just a quick try to it with splines. Maybe this is what you are looking
> for (You looking for the red ones, right?). Excuse the bad texturing.
> 
> Marc
> --
> Marc Schimmler
> 
>   ------------------------------------------------------------------------
>  [Image]
> 
>   ------------------------------------------------------------------------
> camera {location <-16,4,0>
>         look_at  <0,0,0>}
> 
> light_source {<-4,12,0> rgb <1,1,1>}
> light_source {<-4,-12,0> rgb <1,1,1>}
> light_source {<-4,2,-10> rgb <1,1,1>}
> light_source {<-4,2,100> rgb <1,1,1>}
> 
> #declare rseed = seed(643568734);
> 
> //+++++++++ red blood cell declaration ++++++++++++++++++++++++++++++++++++
> 
> #declare red_cell = object{
> lathe {
> cubic_spline
> 12,
> <0.000, 0.410>,
> <0.000, 0.410>,
> <1.200, 0.335>,
> <2.475, 0.035>,
> <3.300, 0.185>,
> <3.600, 0.635>,
> <3.600, 1.235>,
> <3.300, 1.685>,
> <2.400, 1.835>,
> <1.200, 1.535>,
> <0.000, 1.460>,
> <0.000, 1.460>
> 
> pigment {rgb <1,0,0>}
> finish {phong 0.3 ambient 0.2 }}
> };
> 
> //+++++++++++ random placing of 20 blood cells +++++++++++++++
> 
> #declare i = 0;
> 
> #while (i < 20)
>   object{ red_cell
>      translate <rand(rseed)*10,rand(rseed)*10, rand(rseed)*10>
>          rotate    <360*rand(rseed),360*rand(rseed),360*rand(rseed)>}
>   #declare i = i + 1;
> #end;


Post a reply to this message

From: portelli
Subject: Re: blood
Date: 23 Feb 1999 00:09:30
Message: <36D263DF.E4D9AE74@pilot.msu.edu>
all right I made the blood cell now is there a way to randomly place it
in a cylinder?  I kindof adapted the macro FCWS to do it, but it does
not conform to a cylinder yet.  I still do not understand the code
entirely

portelli wrote:
> 
>         I'm trying to make a blood cell and I am not very successful.  First I
> tried using a circle of blobs, using a while loop.  I worked sort of,
> but not good enough.  I'm not to good with splines but I'm going to try
> and do that.  Here is my blob code:
> 
> #declare b = 0;
> blob
> {
>         threshold .6
>         #while ( b<20)
>                 sphere { < .6, 0, 0> .55, 1 rotate <0, b/20*360, 0> }
>                // sphere { < 0, 0, 0> .3, 2 }
> 
>                 #declare b = b+1;
>         #end
>         pigment { color Red }
>         rotate <-40, 0, 0>
> }
> The second sphere does not appear to add  to the blob.   Why?


Post a reply to this message

From: Marc Schimmler
Subject: Re: blood
Date: 23 Feb 1999 02:52:53
Message: <36D25E54.32298912@ica.uni-stuttgart.de>
portelli wrote:
> 
> all right I made the blood cell now is there a way to randomly place it
> in a cylinder?  I kindof adapted the macro FCWS to do it, but it does
> not conform to a cylinder yet.  I still do not understand the code
> entirely
> 

Just my two cents! 
You can set some kind of bounding sphere around each cell and stack them
into the cylinder. The algorithm you can use there should similar to the
one that had been used last year somewhere in the povray newsgroups to
stack spheres in a glas. 
Then you just have to rotate them randomly.

On the other hand a bounding box should result in a denser stacking but
the algorithm for that is far more complex.

Maybe this gets you on the right track.

Marc
--
Marc Schimmler


Post a reply to this message

From: Martin Magnusson
Subject: Re: blood
Date: 23 Feb 1999 09:59:29
Message: <36D2C129.572A4C5D@student.uu.se>
portelli wrote:
> 
> all right I made the blood cell now is there a way to randomly place it
> in a cylinder? 

For a cylinder lying along the x axis you could try this:

#declare Rad = 1;   //Radius
#declare Length = 10;
#declare R = seed(7);

//...

translate <rand(R)*Length, 0, rand(R)*Rad*2-1>
  //That line will place the thing on a "slice" of the cylinder
rotate x*rand(R)*360
  //And that line will rotate it randomly so that it could be anywhere
  //in the cylinder

//...

-- 
Martin Magnusson
Mar### [at] studentuuse
http://www.geocities.com/SoHo/9946/


Post a reply to this message

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