POV-Ray : Newsgroups : povray.general : Asteroid Belt : Re: Asteroid Belt Server Time
31 Jul 2024 14:32:09 EDT (-0400)
  Re: Asteroid Belt  
From: Alain
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

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