POV-Ray : Newsgroups : povray.general : Couple of questions. Server Time
10 Aug 2024 13:22:13 EDT (-0400)
  Couple of questions. (Message 1 to 5 of 5)  
From: Paul Vanukoff
Subject: Couple of questions.
Date: 1 Jan 2000 11:49:34
Message: <386e301e@news.povray.org>
I have a question that I am sure has been asked before -

What is the quickest/easiest way to evenly distribute 'N' number of points
on the surface of a sphere using POV?

Thanks for any insight.

--
Paul Vanukoff
van### [at] primenetcom


Post a reply to this message

From: Nieminen Juha
Subject: Re: Couple of questions.
Date: 1 Jan 2000 12:34:27
Message: <386e3aa3@news.povray.org>
Paul Vanukoff <van### [at] primenetcom> wrote:
: What is the quickest/easiest way to evenly distribute 'N' number of points
: on the surface of a sphere using POV?

  This depends on how accurate it has to be. Here is one way:

#declare Spread = .1;
#declare mintheta = 0;
#declare maxtheta = pi;

camera { location <-4,1,-6>*.7 look_at 0 angle 35 }
light_source { <50,100,-200> 1 }

#declare dtheta = atan2(Spread,1);

#declare R=seed(0);
#declare theta=mintheta;
#while(theta<maxtheta)
  #if(theta=0)
    #declare dphi=2*pi;
  #else
    #declare dphi=dtheta/sin(theta);
  #end
  #declare minphi= -pi + dphi*rand(R)*.5;
  #declare maxphi= pi - dphi/2 + (minphi+pi);
  #declare phi=minphi;
  #while(phi<maxphi)
    sphere
    { z,.05
      rotate x*degrees(theta)
      rotate z*degrees(phi)
      pigment { rgb x } finish { specular .5 }
    }
    #declare phi=phi+dphi;
  #end
  #declare theta=theta+dtheta;
#end


-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Ken
Subject: Re: Couple of questions.
Date: 1 Jan 2000 12:36:01
Message: <386E3AA8.9FA59129@pacbell.net>
Paul Vanukoff wrote:
> 
> I have a question that I am sure has been asked before -
> 
> What is the quickest/easiest way to evenly distribute 'N' number of points
> on the surface of a sphere using POV?
> 
> Thanks for any insight.
> 
> --
> Paul Vanukoff
> van### [at] primenetcom

As I understand it the easiest method does not exist. There are simply to
many solutions to the problem. Check out the sphere FAQ at -

http://www.math.niu.edu/~rusin/papers/known-math/index/spheres.html

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Paul Vanukoff
Subject: Re: Couple of questions.
Date: 1 Jan 2000 13:11:05
Message: <386e4339@news.povray.org>
That is perfect. Thanks!

--
Paul Vanukoff
van### [at] primenetcom


Nieminen Juha wrote in message <386e3aa3@news.povray.org>...

>  This depends on how accurate it has to be. Here is one way:
>
> [code snipped]
>


Post a reply to this message

From: Paul Vanukoff
Subject: Re: Couple of questions.
Date: 1 Jan 2000 13:12:22
Message: <386e4386@news.povray.org>
Thanks .. I only needed an approximate solution. Nieminen has given me what
I need, although there is lots of interesting stuff on that page.

--
Paul Vanukoff
van### [at] primenetcom


Ken wrote in message <386E3AA8.9FA59129@pacbell.net>...

>As I understand it the easiest method does not exist. There are simply to
>many solutions to the problem. Check out the sphere FAQ at -
>
>http://www.math.niu.edu/~rusin/papers/known-math/index/spheres.html
>
>--
>Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
>http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

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