 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Kurts <kur### [at] yahoo fr> wrote in
news:kur### [at] netplex aussie org:
> waht about that :
>
> #declare alea = seed(a_number);
> #declare rotAngle = 360*rand(alea);
>
> #declare objet = sphere {
> <xVal, 0, 0>
> radius
> rotate rotAngle*y
> }
That was my general idea, but it has a flaw, as Slime has pointed out in
another reply.
If you saw the other replies, you can give them a try also.
>> They should have had POV in school, it would of given me a reason to
>> remember my trigonometry. :)
>
> no trigo need for the moment.
Any other ...metry for that matter :)
Thanks
--
Marc Champagne
marcch.AT.videotron.DOT.ca
Montreal, CANADA
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Marc Champagne" <marcch.AT.videotron.DOT.ca> wrote in message
news:Xns### [at] 204 213 191 226...
> Hi folks,
>
> I'm trying (in vain) to write a segment of code that will randomly
place
> a declared object within a fixed-radious circular x-z plane at a
> specific y position.
Have a look at
Subject: Random object placement
http://news.povray.org/povray.text.scene-files/16307/
Doesn't use sqrt(), but then, it was only a demo.
Alf
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> the radii of the circles grows at a squared rate
> as x gets bigger,
Should have been the "circumference", not "radii".
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Slime" <fak### [at] email address> wrote in news:3f6359c9$1@news.povray.org:
>> the radii of the circles grows at a squared rate
>> as x gets bigger,
>
> Should have been the "circumference", not "radii".
noted!
--
Marc Champagne
marcch.AT.videotron.DOT.ca
Montreal, CANADA
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Alf Peake" <alf### [at] peake42 freeserve co uk> wrote in
news:3f635520$1@news.povray.org:
> "Marc Champagne" <marcch.AT.videotron.DOT.ca> wrote in message
> news:Xns### [at] 204 213 191 226...
>> Hi folks,
>>
>> I'm trying (in vain) to write a segment of code that will randomly
>> place a declared object within a fixed-radious circular x-z plane at a
>> specific y position.
>
> Have a look at
> Subject: Random object placement
>
> http://news.povray.org/povray.text.scene-files/16307/
>
> Doesn't use sqrt(), but then, it was only a demo.
I'll take a peek..
Thanks
--
Marc Champagne
marcch.AT.videotron.DOT.ca
Montreal, CANADA
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Among other things, Slime wrote:
> The circumference of the circle which passes through a
> point x on the X-axis is, of course, 2*pi*x^2 (two pi r squared). Since,
> according to this function, the radii of the circles grows at a squared
> rate as x gets bigger, you need to take the square root of x to get even
> randomness.
Erm... the circumference is 2*pi*r, the *area* of the circle pi*r^2. Anyway,
as far as I can tell the reasoning is right, since you're interested in the
way the area of "infinitesimally thin" rings of radii r (or x) grows.
--
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Erm... the circumference is 2*pi*r, the *area* of the circle pi*r^2.
Anyway,
> as far as I can tell the reasoning is right, since you're interested in
the
> way the area of "infinitesimally thin" rings of radii r (or x) grows.
You're right. I thought something was wrong. I kept going over that and
wondering why the circumference even mattered. Thanks.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Slime wrote:
>> the radii of the circles grows at a squared rate
>> as x gets bigger,
>
> Should have been the "circumference", not "radii".
"area" would be even better: circumference is 2*pi*r, area is pi*r*r.
Another application of the rule: http://ogre.nu/doodle.html#spiral
(or look in p.b.i for various other people's images with titles like
"Fibonacci spiral")
--
Anton Sherwood, http://www.ogre.nu/
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Anton Sherwood
Subject: Re: Help: Place objects within a circle
Date: 1 Oct 2003 16:02:28
Message: <3f7b32d4@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Marc Champagne wrote:
> Well it took writing this message to figure out that I can place the
> object randomly on the x radious and then randomly rotate it arround the
> y, it will always remain within the circle.
>
> Am I on the right track here?
Do you care about the orientation of the object?
--
Anton Sherwood, http://www.ogre.nu/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Anton Sherwood <new### [at] ogre nu> wrote in
news:3f7b32d4@news.povray.org:
> Marc Champagne wrote:
>> Well it took writing this message to figure out that I can
>> place the object randomly on the x radious and then
>> randomly rotate it arround the y, it will always remain
>> within the circle.
>>
>> Am I on the right track here?
>
> Do you care about the orientation of the object?
Nope (spheres for blob)
Slime and others have given me some good ideas, if you look
for my WIP donut machine image in p.b.i, the batter in the
bucket was created with their solutions.
Thanks
--
Marc Champagne
marcch.AT.videotron.DOT.ca
Montreal, Canada
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |