|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Folks, I could need a bit of help with a maths problem.
I need an algorithm to generate random points on the surface of a
sphere, conforming to the following criteria:
- The distribution must be radially symmetric around the Y axis.
- The sample density should be roughly uniform, except for a pronounced
peak centered at +Y (but not -Y!)
- For each random point generated, the algorithm also needs to compute
the theoretical sample density at that location.
- The algorithm must be reasonably fast.
Ideally, the algorithm should also have the following properties:
- The density should fall off smoothly from the peak.
- The algorithm should have a parameter to govern the "tightness" of the
peak.
- The sample density away from the peak should approach (but not reach!)
zero.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> Folks, I could need a bit of help with a maths problem.
>
> I need an algorithm to generate random points on the surface of a
> sphere, conforming to the following criteria:
>
> - The distribution must be radially symmetric around the Y axis.
> - The sample density should be roughly uniform, except for a pronounced
> peak centered at +Y (but not -Y!)
> - For each random point generated, the algorithm also needs to compute
> the theoretical sample density at that location.
> - The algorithm must be reasonably fast.
>
> Ideally, the algorithm should also have the following properties:
>
> - The density should fall off smoothly from the peak.
> - The algorithm should have a parameter to govern the "tightness" of the
> peak.
> - The sample density away from the peak should approach (but not reach!)
> zero.
I suppose no. 16 on http://mathworld.wolfram.com/SpherePointPicking.html hints
at the solution: You "just" need a space defined by a vector that meets the
above criteria. The "distortion" of the space at the selected point will then
allow computation of a scalar that should have some relation to the sample
density. Basically, with the shape of the unit hull you can also shape the
sample density by projecting it back on a unit sphere.
However, I am not sure if the "incorrect" example on that page won't
already solve most of your problem.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 26.08.2016 um 10:28 schrieb Thorsten Froehlich:
> I suppose no. 16 on http://mathworld.wolfram.com/SpherePointPicking.html hints
> at the solution: You "just" need a space defined by a vector that meets the
> above criteria. The "distortion" of the space at the selected point will then
> allow computation of a scalar that should have some relation to the sample
> density. Basically, with the shape of the unit hull you can also shape the
> sample density by projecting it back on a unit sphere.
"_hints_ at the solution"... "_some_ relation to the sample density"...
(emphasis added)... I think I see a pattern there ;)
> However, I am not sure if the "incorrect" example on that page won't
> already solve most of your problem.
Not exactly:
- It has samples bunching up at both poles, not just +Y.
- The tightness of the bunching-up cannot be tweaked.
- The off-peak density does not approach zero.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I'm busy at the moment, but:
define a sphere with radius 0.5
pow(x,2) + pow(y,2) = 0.5
so pow(y,2) = 0.5 - pow(x,2)
and y = sqrt ( 0.5 - pow(x,2))
translate y*0.5
y = sqrt ( 0.5 - pow(x,2)) +0.5
make your function equal to the sin of that times pi/2 so that the function
smoothly increases from 0 to 1
add the smallest number POV will work with to that (1E-whatever)
Multiply that by a line equation, the slop of which is the tightness
I will give this some more thought
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Try this as a starting point
// spherical pattern
// Bald Eagle 2016
#version 3.7;
global_settings {assumed_gamma 1.0}
#include "colors.inc"
#include "textures.inc"
#include "rand.inc"
camera {
location <0, 0.5, -2>
look_at <0, 0.5, 0>
}
light_source {<20, 50, -100> White shadowless}
#declare R = 0.5;
#declare Tiny = 0.000001;
#declare Stream = seed (123);
#for (Point, 1, 5000)
#declare Variable = (VRand_On_Sphere(Stream)*0.5 + <0, 0.5, 0>);
#debug concat( "Variable = ", vstr(3, Variable, ", ", 3, 3), " \n")
#declare Color = <abs(pow (Variable.y, 1))+Tiny, 0, 0>;
#debug concat( "Color = ", vstr(3, Color, ", ", 3, 3), " \n")
sphere {Variable, 0.01 pigment {rgb Color}}
#end
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> Folks, I could need a bit of help with a maths problem.
>
> I need an algorithm to generate random points on the surface of a
> sphere, conforming to the following criteria:
>
> - The distribution must be radially symmetric around the Y axis.
> - The sample density should be roughly uniform, except for a pronounced
> peak centered at +Y (but not -Y!)
> - For each random point generated, the algorithm also needs to compute
> the theoretical sample density at that location.
> - The algorithm must be reasonably fast.
>
> Ideally, the algorithm should also have the following properties:
>
> - The density should fall off smoothly from the peak.
> - The algorithm should have a parameter to govern the "tightness" of the
> peak.
> - The sample density away from the peak should approach (but not reach!)
> zero.
I see a certain contradiction because a uniform distribution cannot fall off
smoothly to zero. My first idea is to use a 2D-normal distribution and project
it onto the sphere. One can play with the sigma(s) to sharpen the peak and/or
use weighted averages of such distributions.
Best regards,
Michael
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I see the "probability" aspect of this now...
no time to code it at the moment.
define a spline with a probability function
sparse near 0, denser near 1, maybe exponentially peaking at 1
choose rand between 0 and 1
pluck out y value from spline
then it's just a sphere in that y gradient
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> Folks, I could need a bit of help with a maths problem.
>
> I need an algorithm to generate random points on the surface of a
> sphere, conforming to the following criteria:
>
> - The distribution must be radially symmetric around the Y axis.
> - The sample density should be roughly uniform, except for a pronounced
> peak centered at +Y (but not -Y!)
> - For each random point generated, the algorithm also needs to compute
> the theoretical sample density at that location.
> - The algorithm must be reasonably fast.
>
> Ideally, the algorithm should also have the following properties:
>
> - The density should fall off smoothly from the peak.
> - The algorithm should have a parameter to govern the "tightness" of the
> peak.
> - The sample density away from the peak should approach (but not reach!)
> zero.
Let me simulate it in Blender. I use a system of particles and particle_map.
We have invented a bicycle.
Blender - your problem?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"LanuHum" <Lan### [at] yandexru> wrote:
> We have invented a bicycle.
likely. ;)
// Log spherical pattern
// Bald Eagle 2016
#version 3.7;
global_settings {assumed_gamma 1.0}
#include "colors.inc"
#include "textures.inc"
#include "rand.inc"
#declare R = 5;
camera {
location <0, R, -15>
look_at <0, R, 0>
}
light_source {<20, 50, -100> White shadowless}
#declare Tiny = 0.000001;
#declare Stream = seed (123);
#declare Stream2 = seed (456);
#declare Stream3 = seed (789);
#declare Sphere_Spline =
spline {
linear_spline
-0.25, <-0.25, 0.0, 0>,
0.00, <0.00000000000000000001, 0.0, 0>,
1.00, <1, 0, 0>
1.1 , <1.1, 0, 0>
} //-------------------
#declare Sphere1 =
union {
#for (Point, 1, 1000)
#declare Phi = RRand(0, 2*pi, Stream);
#declare Variable2 = RRand(1.00000001, 10, Stream2);
#declare Theta = -pi*Sphere_Spline(1-log(Variable2))+(pi/2);
#declare X = R * cos (Theta.x) * sin (Phi);
#declare Z = R * cos (Theta.x) * cos (Phi);
#declare Y = R * sin (Theta.x) + R;
sphere {<X, Y, Z>, 0.01 pigment {Red} }
#end
}
object {Sphere1}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "LanuHum" <Lan### [at] yandexru> wrote:
> > We have invented a bicycle.
>
> likely. ;)
>
Tomorrow you will be asked to another location formula. The day after tomorrow
another. In each case the formula. Tired, you want to relax.
I have shown in the screenshots universal way: image_map.
Draw Mandelbrot grayscale on any object - no problem. :)))))
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|