|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
when trying to change the object of my while loop from a regular sphere to
a blob
it seems to perform the while command but ignoring the blob and using only
spheres?
/*here's the code i'm using*/
#declare ct = 0;
#while (ct<10)
blob { threshold .5
sphere {0,1,1 translate ct*y}
pigment {rgb <1,0,0>} }
#declare ct = ct + .5;
#end
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Jason Dinger wrote:
>
> when trying to change the object of my while loop from a regular sphere to
> a blob
> it seems to perform the while command but ignoring the blob and using only
> spheres?
>
> /*here's the code i'm using*/
>
> #declare ct = 0;
> #while (ct<10)
> blob { threshold .5
> sphere {0,1,1 translate ct*y}
> pigment {rgb <1,0,0>} }
> #declare ct = ct + .5;
> #end
Yep.
Get the blob-statement and the closing bracket out of the loop.
Cheers!
Remco
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Perhaps this?
blob { threshold .5
#declare ct = 0;
#while (ct<10)
sphere {0,1,1 translate ct*y}
#declare ct = ct + .5;
#end
pigment {rgb <1,0,0>} }
Jason Dinger <jas### [at] hotmailcom> wrote in message
news:01bf0560$90c397c0$9a1ee1cf@jimmy-the-fish...
> when trying to change the object of my while loop from a regular sphere to
> a blob
> it seems to perform the while command but ignoring the blob and using only
> spheres?
>
> /*here's the code i'm using*/
>
> #declare ct = 0;
> #while (ct<10)
> blob { threshold .5
> sphere {0,1,1 translate ct*y}
> pigment {rgb <1,0,0>} }
> #declare ct = ct + .5;
> #end
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
This is a general rule with such things, if blob were union instead same
thing applies. Probably a common mistake. Looping the entire thing makes a
group of single component blobs, which is basically a sphere anyway.
--
/* Chimera */
Robert Chaffe <rch### [at] compaqnet> wrote in message
news:37e9a4fa@news.povray.org...
| Perhaps this?
|
| blob { threshold .5
| #declare ct = 0;
| #while (ct<10)
| sphere {0,1,1 translate ct*y}
| #declare ct = ct + .5;
| #end
| pigment {rgb <1,0,0>} }
|
|
| Jason Dinger <jas### [at] hotmailcom> wrote in message
| news:01bf0560$90c397c0$9a1ee1cf@jimmy-the-fish...
| > when trying to change the object of my while loop from a regular sphere
to
| > a blob
| > it seems to perform the while command but ignoring the blob and using
only
| > spheres?
| >
| > /*here's the code i'm using*/
| >
| > #declare ct = 0;
| > #while (ct<10)
| > blob { threshold .5
| > sphere {0,1,1 translate ct*y}
| > pigment {rgb <1,0,0>} }
| > #declare ct = ct + .5;
| > #end
|
|
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Jason Dinger <jas### [at] hotmailcom> wrote:
: #declare ct = 0;
: #while (ct<10)
: blob { threshold .5
: sphere {0,1,1 translate ct*y}
: pigment {rgb <1,0,0>} }
: #declare ct = ct + .5;
: #end
Think about it. Each time the #while-loop is parsed, a copy of all that is
between the #while and the #end is created.
So the first time this is created:
blob { threshold .5
sphere {0,1,1 translate ct*y}
pigment {rgb <1,0,0>} }
#declare ct = ct + .5;
Now we loop again and we get another copy:
blob { threshold .5
sphere {0,1,1 translate ct*y}
pigment {rgb <1,0,0>} }
#declare ct = ct + .5;
blob { threshold .5
sphere {0,1,1 translate ct*y}
pigment {rgb <1,0,0>} }
#declare ct = ct + .5;
and so on. When we loop 10 times we get 10 (independent) blob statements.
Obviously you don't want 10 separated blob statements, but one single
blob statement with 10 spheres inside it. Thus we have to create the
blob statement just once:
blob { threshold .5
#declare ct = 0;
#while (ct<10)
sphere {0,1,1 translate ct*y}
#declare ct = ct + .5;
#end
pigment {rgb <1,0,0>}
}
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Nieminen Juha wrote:
>
> Jason Dinger <jas### [at] hotmailcom> wrote:
> Think about it. Each time the #while-loop is parsed, a copy of all that is
> between the #while and the #end is created.
> Obviously you don't want 10 separated blob statements, but one single
> blob statement with 10 spheres inside it. Thus we have to create the
> blob statement just once:
I think the confusion here is understandable. One would naturaly
conclude that a blob is an object. However it is only the spheres
in the blob statement that are a true object while the blob itself
is a function wrapper much like a CSG operation would be when used
with while loops.
--
Ken Tyler
See my 1000+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|