POV-Ray : Newsgroups : povray.general : Making an Asteroid Belt Server Time
17 Nov 2024 03:20:31 EST (-0500)
  Making an Asteroid Belt (Message 1 to 5 of 5)  
From: mcavoys
Subject: Making an Asteroid Belt
Date: 30 Jun 2003 17:14:31
Message: <3f00a817.128019492@news.povray.org>
Can anyone suggest a method to represent an asteroid belt for an orrery I'm
making?
Nothing too fancy as there will be lots of other objects in the scene and I
think it will end up as an animation. I was thinking of something to fill a
torus with grain like objects. The orrery will not be realistic, astronomically
correct just something to give the impression of an asteroid belt.
Thanks in Advance.

Regards
        Stephen


Post a reply to this message

From:
Subject: Re: Making an Asteroid Belt [46 KB JPEG]
Date: 30 Jun 2003 22:31:05
Message: <3f00f269$1@news.povray.org>
Hi Ken,

sorry for this error -- just before I was browsing p.b.i. ...

The help of this outlook tells me I can only clear *downloaded*
postings from *my* computer, so how can I delete from the
*newsgroup*?

   Sputnik


Post a reply to this message

From:
Subject: Re: Making an Asteroid Belt
Date: 30 Jun 2003 23:20:05
Message: <3f00fde5$1@news.povray.org>
// Hi Stephen,
//
// I've just posted "Asteroids and more for Stephen ... [46 KB JPEG]" to
// p.b.i. That image was an easter joke, but the asteroids could be a
// starting point for you. The following code is a fragment from this
// scene (but ready-to-render), containing only a minimal scene with
// asteroids made of spheres. Some comments (in english) are added, I
// hope you can live with the german words.
//
//    Sputnik

// P.S. I assume it's OK to post such a small SDL "inline" snippet as a
//      direct answer in this group, or should I have posted it to p.t.s-f?


// +SP8 +EP8 +W1280 +H1024 +A0.1 +AM2 +R3 +B100 -FN


// Asteroids ----------------------------------------------------------------

#declare Number = 300;
#declare Rand = seed(89797234);

#declare I = 0;
#while (I<Number)

  // choose random orbit (see translate statement below), random brightness
  #declare R = rand(Rand)-0.5;
  #declare Brightness = .8-.3*rand(Rand);

  // create an asteroid in the origin; random size 0.04 ... 0.12
  sphere { 0, 0.04+0.08*rand(Rand)

    // put onto orbit at radius 7+some_variation
    // The function 7+(4*R*R+1)*R maps R from the range [-0.5...0.5] to the
    // range [6...8]. Because this function has a steep/not_so_steep/steep
    // shape, the result is more likely to be 7 than 6 or 8, so the asteroid
    // density at 7 is larger than at 6 or 8.
    translate ( 7 + (4*R*R+1)*R ) * x

    // let asteroid orbit to a random angular position
    rotate 360*rand(Rand)*y

    // apply a simple random texture
    texture {
      pigment { color rgb <1, 1-.2*rand(Rand), 1-.2*rand(Rand)>*Brightness }
      finish { ambient .3 diffuse .7 }
      }

    // a must if sun and all asteroids are in the same plane
    no_shadow
    }

  #declare I = I+1;
  #end


// Kamera und Beleuchtung ---------------------------------------------------

#declare Uhr = 360/12;

#declare Aspekt = image_width/image_height;

#declare Uhr = 360/12;

#declare Aspekt = 1024/768;

#declare Bildhoehe = 8;
#declare Bildbreite = Aspekt*Bildhoehe;
#declare Bildentfernung = 2*Bildhoehe;
#declare Fokus = 0;
#declare Fokusentfernung = 33;
#declare Kamerarichtung = 6*Uhr; // als "Uhrzeit"
#declare Kamerahoehe = 23; // in Grad
#declare Linksneigung = 20;

camera {
  location -Fokusentfernung*z
  right Bildbreite/2*x
  up Bildhoehe/2*y
  sky y
  direction Bildentfernung/2*z
  look_at 0
  rotate Linksneigung*z
  rotate <Kamerahoehe, Kamerarichtung-180, 0>
  translate Fokus
  }


light_source { 0, rgb 1 }


// ENDE =====================================================================


Post a reply to this message

From: mcavoys
Subject: Re: Making an Asteroid Belt
Date: 1 Jul 2003 03:35:44
Message: <3f01390f.165131566@news.povray.org>

<fr### [at] computermuseumfh-kielde> wrote:

>// Hi Stephen,
>//
>// I've just posted "Asteroids and more for Stephen ... [46 KB JPEG]" to
>// p.b.i. That image was an easter joke, but the asteroids could be a
>// starting point for you. The following code is a fragment from this
>// scene (but ready-to-render), containing only a minimal scene with
>// asteroids made of spheres. 

Thanks a lot. It's more than I expected, the sample code is just what I want,
fast too. 

>Some comments (in english) are added, I
>// hope you can live with the german words.
Common Europe, of course I can. The comments are germane and easily understood.

Regards
        Stephen


Post a reply to this message

From: mcavoys
Subject: Re: Making an Asteroid Belt
Date: 1 Jul 2003 18:00:56
Message: <3f020468.44732381@news.povray.org>

<fr### [at] computermuseumfh-kielde> wrote:


>// I've just posted "Asteroids and more for Stephen ... [46 KB JPEG]" to
>// p.b.i. 

Frank, thanks again. I've posted an image in p.b.i of a WIP using it. My reader
started an new thread called Re: Asteroids and more for Stephen


Regards
        Stephen


Post a reply to this message

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