POV-Ray : Newsgroups : povray.binaries.scene-files : Geodesic.inc : Re: Geodesic.inc Server Time
4 May 2024 13:55:07 EDT (-0400)
  Re: Geodesic.inc  
From: Samuel Benge
Date: 2 Nov 2013 14:00:01
Message: <web.52753d54c0b30abf6949fcad0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> To clarify, the links are not about evenly spaced points
> on a sphere, but about creating points for a light dome.

I haven't checked out those links, but I've got a good way to produce an
arbitrary number of evenly-spaced points on a sphere. It's based on the Fermat
Spiral, but adapted to work on a sphere (can't remember where I found it):

union{
 #local NPoints = 256;
 #local Radius  = 1;

 #local Inc = pi * (3 - sqrt(5));
 #local Off = 2 / NPoints;
 #for(K, 0, NPoints-1)
  #local Y = K * Off - 1 + (Off / 2);
  #local R = sqrt(1 - Y*Y);
  #local Phi = K * Inc;

  #local ThisPoint = <cos(Phi)*R, Y, sin(Phi)*R>*Radius;
  sphere{ThisPoint, .1}
 #end

 pigment{rgb 1}
}

"And" <49341109@ntnu.edu.tw> wrote:
> It seems useful and have many information.
> Previously, I found that Samuel Benge's macro seems easy to use, so I asked for
> this directly.
> Thank you.

My geodesic sphere code is not the best choice, as it produces duplicate points,
and you can't just /choose/ any number of points you want (when dealing with a
light dome made up of numerous light_sources, you would probably want an easy
way to fine-tune quality over speed). The above code should work fairly well for
producing an array of lights for a light dome.

Maybe somebody who has experience working with light domes can put it to use.

Sam


Post a reply to this message

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