POV-Ray : Newsgroups : povray.newusers : while loops, blobs, and such Server Time
29 Nov 2024 08:26:37 EST (-0500)
  while loops, blobs, and such (Message 1 to 3 of 3)  
From: Litscher
Subject: while loops, blobs, and such
Date: 24 Dec 1998 00:04:22
Message: <3681CB3C.290D1897@users.qual.net>
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


Post a reply to this message

From: Jerry Anning
Subject: Re: while loops, blobs, and such
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

From: Litscher
Subject: Re: while loops, blobs, and such
Date: 25 Dec 1998 00:16:43
Message: <36831FB6.A371FE3@users.qual.net>
Jerry Anning wrote:
> 
> Change while to #while and it works.
> 
> Jerry Anning
> cle### [at] dholcom

Oh bloody hell! :) Thankyou ever so much. I'm glad I posted the source
then... Once again, thanks 

Ross.


Post a reply to this message

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