POV-Ray : Newsgroups : povray.newusers : blobs and loop Server Time
5 Sep 2024 04:15:58 EDT (-0400)
  blobs and loop (Message 1 to 5 of 5)  
From: marabou
Subject: blobs and loop
Date: 11 Feb 2002 14:31:31
Message: <3c681c13@news.povray.org>
hello, 

i wanted to use a while-loop in blob-function. but all i get is an 
error-message that at least one component is needed in a blob. who can help?
code follows. thanks in advance.

//--------------------------------------------->code start

//version 3.1

#include "colors.inc"

#declare cam1=
camera{location <0,0.2,-1> look_at <0,0,0>
}

camera {cam1}

light_source{
        <0,2,-2>
        color White
}

background{
        color White
}

plane{
        y,0
        pigment{color White}
}

#declare blob_tex = texture {pigment {color White}}
#declare blob_fin = finish {
        phong 0.5
        reflection 0.01
        diffuse 0.6
}

blob{
#local anz = 5;
#local counter = 1;
        threshold 0.1
        while(counter <= anz)
        sphere{
                <0.1*counter,0.1,0>,0.1, 1
                texture{blob_tex}
                finish{blob_fin}
        }
        #local counter = counter + 1;
        #end//while
}

//---------------------------------------------<code end
-- 
mails only arrive without the i's in domainname.


Post a reply to this message

From: Florian Pesth
Subject: Re: blobs and loop
Date: 11 Feb 2002 15:18:59
Message: <3c682733@news.povray.org>
Hi!
You forgot a "#" before the while, so "#while" instead of "while" will work.
Best regards,
Florian
//--------------------------------------------->code start

//version 3.1

#include "colors.inc"

#declare cam1=
camera{location <0,0.2,-1> look_at <0,0,0>
}

camera {cam1}

light_source{
        <0,2,-2>
        color White
}

background{
        color White
}

plane{
        y,0
        pigment{color White}
}

#declare blob_tex = texture {pigment {color White}}
#declare blob_fin = finish {
        phong 0.5
        reflection 0.01
        diffuse 0.6
}

blob{
#local anz = 5;
#local counter = 1;
        threshold 0.1
        #while(counter <= anz)
        sphere{
                <0.1*counter,0.1,0>,0.1, 1
                texture{blob_tex}
                finish{blob_fin}
        }
        #local counter = counter + 1;
        #end
}


Post a reply to this message

From: marabou
Subject: Re: blobs and loop
Date: 11 Feb 2002 17:18:12
Message: <3c684324@news.povray.org>
i feel so embarrassed...


Post a reply to this message

From: Mark Hanford
Subject: Re: blobs and loop
Date: 11 Feb 2002 17:24:05
Message: <3c684485@news.povray.org>
Okay, will everyone reading this who has never done this kind of thing
please own up...

:o)

Mark Hanford
http://www.mrhanford.com/povray

"marabou" <agu### [at] gimixnet> wrote in message news:3c684324@news.povray.org...
>
> i feel so embarrassed...
>


Post a reply to this message

From: Tom Melly
Subject: Re: blobs and loop
Date: 13 Feb 2002 12:01:34
Message: <3c6a9bee$1@news.povray.org>
"Mark Hanford" <ren### [at] blueyondercouk> wrote in message
news:3c684485@news.povray.org...
> Okay, will everyone reading this who has never done this kind of thing
> please own up...
>

Nah - my trick is to put the "blob{" within the while loop ;)


Post a reply to this message

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