POV-Ray : Newsgroups : povray.general : Asteroid Belt Server Time
31 Jul 2024 12:25:14 EDT (-0400)
  Asteroid Belt (Message 11 to 11 of 11)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Alain
Subject: Re: Asteroid Belt
Date: 13 Jul 2007 10:17:35
Message: <4697897f@news.povray.org>
scott nous apporta ses lumieres en ce 2007/07/13 09:56:
>> I'd use the following steps:
>> 1 - randomly chose a point along the axis of your cone
>> 2 - randomly chose a radius, adjust that acording to your location 
>> along the axis
>> 3 - randomly chose an angle from 0 to 360 and rotate your location 
>> around the axis
>> 4 - place one asteroid at that location, and check that it don't 
>> intersect another one. Use an array to store the locations.
> 
> Isn't that method going to produce more asteroids per unit volume near 
> the narrow end of the cone, and also near the axis of the cone?
> 
> 
It's natural to have a higher density near the axis.
You can add some ponderation based on the radius to decrease the density near 
the small end. Just multiply a random value by the current radius and check 
against a thressold value, small radius = lower chance, large radius = higher 
chance.

-- 
Alain
-------------------------------------------------
Fundamentalism: If shit happens to a televangelist, it's okay.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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