POV-Ray : Newsgroups : povray.binaries.images : blood : Re: blood Server Time
4 Oct 2024 21:11:49 EDT (-0400)
  Re: blood  
From: Martin Magnusson
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.