POV-Ray : Newsgroups : povray.general : Help: Place objects within a circle Server Time
4 Aug 2024 04:14:36 EDT (-0400)
  Help: Place objects within a circle (Message 11 to 20 of 20)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Marc Champagne
Subject: Re: Help: Place objects within a circle
Date: 13 Sep 2003 13:29:00
Message: <Xns93F588C083D6POVMIKA@204.213.191.226>
Kurts <kur### [at] yahoofr> wrote in
news:kur### [at] netplexaussieorg: 

>   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

From: Alf Peake
Subject: Re: Place objects within a circle
Date: 13 Sep 2003 13:34:24
Message: <3f635520$1@news.povray.org>
"Marc Champagne" <marcch.AT.videotron.DOT.ca> wrote in message
news:Xns### [at] 204213191226...
> 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

From: Slime
Subject: Re: Place objects within a circle
Date: 13 Sep 2003 13:54:17
Message: <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".

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Marc Champagne
Subject: Re: Place objects within a circle
Date: 13 Sep 2003 16:56:10
Message: <Xns93F5ABE0933E2POVMIKA@204.213.191.226>
"Slime" <fak### [at] emailaddress> 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

From: Marc Champagne
Subject: Re: Place objects within a circle
Date: 13 Sep 2003 16:57:11
Message: <Xns93F5AC0C841A7POVMIKA@204.213.191.226>
"Alf Peake" <alf### [at] peake42freeservecouk> wrote in
news:3f635520$1@news.povray.org: 

> "Marc Champagne" <marcch.AT.videotron.DOT.ca> wrote in message
> news:Xns### [at] 204213191226...
>> 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

From: Jellby
Subject: Re: Place objects within a circle
Date: 15 Sep 2003 17:11:37
Message: <3f662b08@news.povray.org>
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

From: Slime
Subject: Re: Place objects within a circle
Date: 15 Sep 2003 17:53:35
Message: <3f6634df$1@news.povray.org>
> 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

From: Anton Sherwood
Subject: Re: Place objects within a circle
Date: 1 Oct 2003 16:02:07
Message: <3f7b32bf$1@news.povray.org>
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

From: Marc Champagne
Subject: Re: Help: Place objects within a circle
Date: 1 Oct 2003 18:09:37
Message: <Xns9407B8589B924POVMIKA@204.213.191.226>
Anton Sherwood <new### [at] ogrenu> 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

<<< Previous 10 Messages Goto Initial 10 Messages

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