|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello,
how can I distribute some points randomly on sphere, but that they would be +/- in
same range from
each oter (uniformly) ?
#local R1=seed(3433452);
#local I=0; #while (I<500)
#local B = vrotate(<0,30,0>, <rand(R1)*360,0,rand(R1)*360>);
#local I=I+1; #end
this method is wrong, because poins are close togeather at top and bottom of sphere
and there are few
in middle
--
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
in news:Xns### [at] 204213191226 Rafal 'Raf256' Maj
wrote:
> how can I distribute some points randomly on sphere,
"7.12.1 Generation macros (flat distribution)"
- vrand_on_sphere
Ingo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rafal 'Raf256' Maj wrote:
> how can I distribute some points randomly on sphere, but that they would
> be +/- in same range from each oter (uniformly) ?
>
make random points in the cube <-1,-1,-1>,<1,1,1> and if their
distance from origin is <1 project them on the sphere otherwise throw them
away
--
POV-Ray Objects Collection: http://objects.povworld.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Micha Riser <mri### [at] gmxnet> wrote:
> make random points in the cube <-1,-1,-1>,<1,1,1> and if their
> distance from origin is <1 project them on the sphere otherwise throw them
> away
He asked points *on* a sphere, not *in* a sphere... :)
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
> Micha Riser <mri### [at] gmxnet> wrote:
>> make random points in the cube <-1,-1,-1>,<1,1,1> and if their
>> distance from origin is <1 project them on the sphere otherwise throw
>> them away
>
> He asked points *on* a sphere, not *in* a sphere... :)
>
... and that's exactly why I said "project them on the sphere" :)
--
POV-Ray Objects Collection: http://objects.povworld.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|