~FIBONACCI~EXPERIMENTS~ continued...
As always, the 1st attempt to simplify the fibonacci algorithm was flawed.
But in a lucky way. Because…
every flaw reveals an insight.
And this flaw no different.
Here is the thing though…
The curve noise twists the halfpipe in the way we are looking for!
The elusive BANK or ROLL on the axis.
WHAT??? No way. Yes… Check it out!
A Fibonacci sequence “loosened” or “tightened” with noise, twists the curve in or out!
SAME AS: ExtrudeShapeCustom.rotationFunction - but for the whole curve in a single number.
NOTE: the Custom RotationFunction is set to return 0…
So this gets interesting!
The concept of tightening and loosing the noise in the fibSEQUENCE - has many surprises.
If you want tighter~corners on your HALFPIPE or MOTOCROSS, or Bobsled … TRACK , then:
- add negative noise to the Curve!
In this case… the Fibonacci Golden Ratio.
As usual, there is more to it… HERE IS THE GOOD STUFF
too long did not read. I know.
The OPTIMIZED Fibonacci was SIMPLIFIED and ENHANCED into a FACTORY-PATTERN.
fibFactory()
Like this…
function fibFactory(fib){
var nextFib = fib.lastFib + fib.thisFib + fib.curveNoise;
return {thisFib:nextFib,lastFib:fib.thisFib,curveNoise:fib.curveNoise,fibLength:fib.fibLength};
} //EXAMPLE: fibFactory({lastNum,thisNum})//1,2,3,5,8
You can see the curveNoise in there. Making it -0.4 gave nice inward curve.
-noise:0 can be added to the factory-configuration-object, along with length:1000, as you can see.
In the graduator… the “grade” and “affect”… can be any INDEX.
EXAMPLE:
anm the opacity, we think with size, is how to make CLOUDS? On a rotation and position noise, around fib points, to get a cluster… ?
Below is an attempt to graduate noise across many indexes and see - does that turn spheres into clouds?
STORY:
There is this fine-digital-artist name… CreativeShrimp. Really admire him. His medium is Blender.
Maybe YOU know of him? He is a Creative Genius. Also very good at communication.
One particular conference - he pointed out an AMAZING trick - to make things BEAUTIFUL!
The SECRET to BEAUTIFICATION - as told by Creative Shrimp, is 3 THINGS:
- Large, big shapes in the distance, to define the depth of the scene.
- Medium, smooth surfaces that give quick insight as to what is around us.
- Small, clusters of detail, where we can focus our eyes, and be delighted by what we find.
Anyway… you can watch the VIDEO - it is VERY AMAZING, or just TRUST the dog in sunglasses, the moral of this STORY is important!!!
CONCLUSION:
It seems to be, that the shape of a CUMULUS CLOUD… might be like that?
Big outline, medium definitions, and small details? Let’s see…
A good Start. This effect occurs with the use of the 2 GRADUATORS (above) SIZE and YPOS.
Here is a “graduator”
(i<8) ? i/2 : i*2
a ternary-operator, that either slows or accelerates an offset (noise).
placed on any idx.
Here is a FULL SPIRAL:
var thetaSpiral = 0;
var circleScale = 200; //spins the spiral!
var fibNum = {lastFib:0,thisFib:1,curveNoise:-0.3,fibLength:100};
for(var i=0; i<=fibNum.fibLength; i++) {
var sphere = BABYLON.Mesh.CreateSphere("sphere", 3, (i<8)?i/2:i*2 , nx.scene); //graduator on size.
sphere.position = new BABYLON.Vector3(0, (i<8)?i/2:i*2, 0); //graduator on y position
fibNum = fibFactory(fibNum);//adds-two-numbers-together-and-returns-a-thisFib-.
sphere.position.x += (Math.sin(thetaSpiral)) * (fibNum.thisFib/ circleScale)
sphere.position.z += (Math.cos(thetaSpiral)) * (fibNum.thisFib/ circleScale)
thetaSpiral += 0.5;
}
Check Out: Y POSITION, and Circle SIZE.
Also, note ENCAPSULATION into the Fibonacci Factory?
The graduators could be added as… yPosIdx:fn(){}
…on each idx. : )
and anms across time.
More cool things!?!
The thing about Ficonacci Sequence is how it extends across size and time in a remarkable way.
So the SEQUENCE can be Graded with graduators.
SIMPLIFIED~FIBONACCI~FACTORY
function fibFactory(fib){
var nextFib = fib.lastFib + fib.thisFib + fib.curveNoise;
return {thisFib:nextFib,lastFib:fib.thisFib,curveNoise:fib.curveNoise,fibLength:fib.fibLength};
} //EXAMPLE: fibFactory({lastNum,thisNum})//1,2,3,5,8
var thetaSpiral = 0;
var circleScale = 200; //spins the spiral!
var fibNum = {lastFib:0,thisFib:1,curveNoise:-0.3,fibLength:100};
for(var i=0; i<=fibNum.fibLength; i++) {
var sphere = BABYLON.Mesh.CreateSphere("sphere", 3, (i<8)?i/2:i*2 , nx.scene); //graduator on size.
sphere.position = new BABYLON.Vector3(0, (i<8)?i/2:i*2, 0); //graduator on y position
fibNum = fibFactory(fibNum);//adds-two-numbers-together-and-returns-a-thisFib-.
sphere.position.x += (Math.sin(thetaSpiral)) * (fibNum.thisFib/ circleScale)
sphere.position.z += (Math.cos(thetaSpiral)) * (fibNum.thisFib/ circleScale)
thetaSpiral += 0.5;
}
Someday… BABYLON. CLOUDS!
CLOUD-PLAN:
- Noise graduators on rotation spin, and anm the opacity and size idx, around fibPoints.
- Multiple random curves… perhaps, fibonacci curves of fibonacci curves.
- Would be very cool to continue() an opposite facing fib spiral.
- Check it out 2 PATTERNS. Of triples and quads.
Sorry, I WRITE TOO MUCH!
Will condense.
Just experiments, and…
TLDR; Fibonacci builds a tornado, clouds?
Open to other variations, and,
Hope this helps someone,
TLDR; - Fibonacci curves.