POV-Ray : Newsgroups : povray.newusers : while loops, blobs, and such : Re: while loops, blobs, and such Server Time
3 Oct 2024 21:22:00 EDT (-0400)
  Re: while loops, blobs, and such  
From: Jerry Anning
Date: 24 Dec 1998 01:44:18
Message: <3681E2B1.83668FC1@dhol.com>
Litscher wrote:
> 
> Hello,
>         I've recently been trying skills at hand coding things rather than usig
> moray. One of the things I can not figure out is how to create a blob
> object composed of many (< 100) randomly translated/scaled spheres. I
> try doing something like
> 
> #declare R1 = seed(812);
> #declare R2 = seed(213);
> #declare R3 = seed(623);
> 
> blob {
>         threshold .75
>         #declare counter = 20;
>         while (counter > 0)
>         sphere {
>                 <rand(R1) * 2, rand(R2) * 5, rand(R3) *  2>,
>                 rand(R1) * 1.5,
>                 1
>                 }
>         #declare counter = counter - 1;
>         #end
>         pigment {
>                 color rgb <1.0, 0.0, 0.35>
>                 }
>         }
> 
> but I get an error saying something along the lines of I need at least
> one componant in a blob. If anyone could help me out here, I would be
> much relieved. thanks a lot.
> 
> Ross

Change while to #while and it works.

Jerry Anning
cle### [at] dholcom


Post a reply to this message

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