POV-Ray : Newsgroups : povray.general : random generation of shapes Server Time
28 Nov 2024 05:59:46 EST (-0500)
  random generation of shapes (Message 1 to 5 of 5)  
From: kike
Subject: random generation of shapes
Date: 13 Jul 2007 10:25:01
Message: <web.46978a8ed4e32b7fbe7bfb550@news.povray.org>
Hi:

My question is, what happens if you want to create let's say a random
distribution of spheres joint by a blob object. My first idea was:

blob{
do while()

and here a set of spheres

}

this doesnt seem to work. And the same holds for prisms with random vertex
and other shapes. My solution was to create a script with Fortran that
writes the whole set of random spheres and the copy/paste it to pov. My
question is, is there an easy way to do this?


Post a reply to this message

From: Penelope20k
Subject: Re: random generation of shapes
Date: 13 Jul 2007 10:46:23
Message: <4697903f$1@news.povray.org>
#declare SD=seed(235);

blob {
 threshold .6
 #declare index=0;
 #while(index<30)
  sphere {3*<rand(SD),rand(SD),rand(SD)>,rand(SD),1}
  #declare index=index+1;
 #end
 pigment {rgb 1}
 }













news:web.46978a8ed4e32b7fbe7bfb550@news.povray.org...
>
> Hi:
>
> My question is, what happens if you want to create let's say a random
> distribution of spheres joint by a blob object. My first idea was:
>
> blob{
> do while()
>
> and here a set of spheres
>
> }
>
> this doesnt seem to work. And the same holds for prisms with random vertex
> and other shapes. My solution was to create a script with Fortran that
> writes the whole set of random spheres and the copy/paste it to pov. My
> question is, is there an easy way to do this?
>
>
>


Post a reply to this message

From: Penelope20k
Subject: Re: random generation of shapes
Date: 13 Jul 2007 10:47:33
Message: <46979085$1@news.povray.org>
works fine .....
with 100+






news:web.46978a8ed4e32b7fbe7bfb550@news.povray.org...
>
> Hi:
>
> My question is, what happens if you want to create let's say a random
> distribution of spheres joint by a blob object. My first idea was:
>
> blob{
> do while()
>
> and here a set of spheres
>
> }
>
> this doesnt seem to work. And the same holds for prisms with random vertex
> and other shapes. My solution was to create a script with Fortran that
> writes the whole set of random spheres and the copy/paste it to pov. My
> question is, is there an easy way to do this?
>
>
>


Post a reply to this message

From: Penelope20k
Subject: Re: random generation of shapes
Date: 13 Jul 2007 10:50:11
Message: <46979123$1@news.povray.org>
i have modified script for 10000+
adding a hollow

#declare SD=seed(235);

blob {
 threshold .6
 #declare index=0;
 #while(index<1200)
  sphere {3*<rand(SD),rand(SD),rand(SD)>,rand(SD),1}
  #declare index=index+1;
 #end
 pigment {rgb 1}
 hollow
 }



cant verify for more object ...no powerfull enough





news:web.46978a8ed4e32b7fbe7bfb550@news.povray.org...
>
> Hi:
>
> My question is, what happens if you want to create let's say a random
> distribution of spheres joint by a blob object. My first idea was:
>
> blob{
> do while()
>
> and here a set of spheres
>
> }
>
> this doesnt seem to work. And the same holds for prisms with random vertex
> and other shapes. My solution was to create a script with Fortran that
> writes the whole set of random spheres and the copy/paste it to pov. My
> question is, is there an easy way to do this?
>
>
>


Post a reply to this message

From: kike
Subject: Re: random generation of shapes
Date: 13 Jul 2007 11:50:01
Message: <web.46979e756187156dbe7bfb550@news.povray.org>
Thanks and sorry, now seems to be quite simple so I feel a bit stupid.


Post a reply to this message

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