~ aFalcon: Deep~Dives

A fine mentor once taught: if you want to learn a library then read the sourcecode. : )
So that is is how??? Alright then… that is what will happen below. For YOUR SAKE, read of MANY EXPERIMENTS, Trials and Tribulations - from the SAFETY of your seat.


NEW AND IMPROVED!

This is a DEEP-DIVE. YOU WILL NEED a pressure-suit.

AFALCON~DEEP-DIVES to BABYLON!

  • “Diver one in the water…”

I’ll JUST LIST A WHOLE BUNCH OF RANDOM 3D TOPICS NOW…

The Babylon max source is a total thrill-ride to read. What ARE ALL these WONDERFUL things?

:black_heart: the Dot and Cross Product?

  • epsilon is what now?

gotta getWithin the Epsilon()?

Ok. : )

I try NOT to get EXPONENTIAL.


TOPICS~ABOUND:

  • SAND and ICE materials WITH particles of DUSTCLOUD and ICEBLAST explosions!?

  • ELECTRIC-SHOCKS and LAVA with LASERS?

planetoid64

QUESTION: Do you see the LASER-RAINBOW?

What is it? _anyone?

ALL parallel lines on ALL computer screens… form wave pattern. Even TVs…

planetoid57

Someday - aFalcon-deep-dives LASER-RAINBOW.


This year… HUNDREDS OF THINGS TO DEEP-DIVE-.

expand a DustPoof into a DustCloud into a SandStorm.

dig up Electricity SOLUTION from 2017! 2017???

AND, more sparks. SPARKS.


First OF ALL (oops)

  1. RIGS - GET ANM RIGS - HERE (below)

Not talking BONES (yet).

BABYLON - please HAVE this Skateboard, Snowboard, Surfing, Physics Rig because - it is ALSO… is a BOAT!

boat

TALKIN-TILT-RIG. Makin’ Puppets - who wants one???

BABYLON NEEDS a BOAT.

CAR, WAGON, ROLLERCOASTER - BOAT

BEGINNING of a BABYLON.TORNADO below.


  1. Fibonacci!

The idea is to SPIN crystals into CLUSTERS.

So FibClusterer??? : )

I want to SPIN a fibonacci curve and make CUMMULUS CLOUDS.

Might be the mathematical secret to (what we consider) “beautiful”? , said someone.

Yep - deep-divin’ that.

Fibonacci is so strange… ALWAYS BEAUTIFUL… and yet so mysterious… I continually FAIL to USE IT. :frowning:

Trying again (below)…


:eagle: FOCUS →

  1. SmartCams. Cams of camz in anmz. Bear with me here. This is THE DEEP…

If you extend naming-conventions long enough… you create( new language() );

SEQUENCES. [{},…] (below) Like very much.

Just Objects in Arrays. Deep-Dive (below).

In dimension t, for TIME. Tighly compacted. Fully customizable sequences In 3D called - anms.

DEEP-DIVE!

We just made it. Look around!

CONSIDER:

  • fully animated factories of: cam, path, zoom, tgt, AND anm.

On the TenKeyCTRL.

SmartCamz:

  • BoomCam

  • SnapCam

  • … FaceCam

Zooms in on any … face, object etc…

and within TEN-KEY-CTRL

It is FUN!

(below)


“Treasure Everywhere!?!” :star2:

~ main man → Calvin & Hobbes.


Endless Examples…

  • Achievement Unlocked: DYNAMIC-ZONE-ALARMS. Deep-dive (below).

  1. Bird revisits…

Face and Eyeball Rotation Animations! :baby_chick:

eyes1

Oh. :black_heart:

Chomping???

Can you see it chomping? Make two half-circles “CHOMP”!

Elusive!!!

Favorite-thing: Two eyes rolling and mouth chomping. :black_heart:

Sometimes we can only dream (for now) deep-dive! :dove: :sunflower::volcano:

Joke about 3DHeaven removed! But maybe, just maybe… [no more jokes!!!]

TOO MUCH TO FOCUS ON. But the jokes help to remember more…??? Huh.


Yes… opportunities to deep-dive are endless.

  1. MOUNTAINS: Ribbon Editing. Combined with spray-paint-landscaping-materials - dust storm etc.

Multi-Materials??? Ok. Need that…


Final Bit… TAKING THE DIVE!

eagle shouts into the “void 0” :eagle:

Have you SEEN THAT??? (in the source-code):

void 0 
  • what is that for?

Because, void is not enough! Gotta add zero? Oh good. Funny.

So… many jokes removed.


THIS SPRING: :sunflower: cranking out the GOOD STUFF!!! :sunny: (We can only hope). :wilted_flower: Either way: THIS BIRD IS GOING TO TAKE THE DIVE. Because BABYLON is the best in the world. :earth_americas: So why not??? But also, because sometimes we only get ONE-SHOT. So, when YOU get just one JUMP, plan the leap, then make that ~DEEP~DIVE~. Here goes.

Jump~Rig (check), Tilt-Rig (check), {gravity:on, mag:0.85}. Hold your nose…

aFalcon-Deep-Dives… :grin:

Cheers, :bird:

3 Likes

FIBONACCI GOLDEN RATIO LINE SPIRAL EXPERIMENTS:

TRIBUTE: extending the awesome work from @jerome (JB3D) and @Wingnut (aka CommanderWingnut OR Cmdr.Wingnut[for short]) PG: circle spiral, tube) and others from the best in industry DOCS. @JohnK

NEW REQUIREMENTS: golden ratio spiral LINE cone in y plane, and extrude.

UPDATE: Not as easy as first thought! AND

CONFIRM: Fibonacci is NOT pasta. :open_mouth:


Did a bunch of stuff…

HERE IS THE 1st PG of FIBONACCI GOLDEN RATIO SPIRAL LINE EXPERIMENTS:

Babylon.js Playground


It had some surprises…

SCALING: is a interesting problem. It scales fast AND never changes! You can’t scale Fibonacci? Because the curve is the same at all sizes?

PROBLEM: simply add more points on line, to smooth the line. Spirals down or up - it only SPINS as it is scaled? No way!

Someone please correct that, if my mind is er butter (could be).

Certainly there is a way to interpolate the golden ratio for all points inbetween (to get a smooth line). I don’t see how. So…

BIRD IS A CHEATER: To get the smooth BLUE curve we just throw the points into a Ed CatMull and Rom Spline! Bling! :japanese_goblin: : )


OPTICAL-ILLUSIONS - all lines are FLAT in the y-axis (above) but they don’t look flat do they?

fib4

Also is the curve perfect or is there a “spline bubble”? Smoothed the curve with param to 100. Catmull is cool.

And (per PM!) we graduate the line to shape into an actual cone (a bit).

Another surprise… how it flattens out toward the top? Weird.


FAILED-ATTEMPTS - FIXED!

OPTIMIZATION: simplified to => getFibNum()

SHOWING-NORMALS: adjusting normals was not the problem!!!


SURPRISE! > SUNFLOWER MATH!!!

in the SPIN!! I’ll be… :sunflower:

PG: Babylon.js Playground

HOLDUP! From below… it is a tornado!?!

Or water vortex! :black_heart: Thank you filius Bonacci!

How is this NOT HELPFUL somewhere???

Who wants to render the 1st tornado in BABYLON? :slight_smile:

Tornado would be cool in video game / STORY.

Check it out…

MATH is Amazing!

CONCLUSION: Fibonacci sequences are beautiful AND… mysterious.

Typical, try for a flower, end up with tornado. :unamused:

Who knows - anything can happen!

Please share variations on using Fibonacci to describe many things!

FUTURE: organic-looking crystal-clusters!!!

Because, life is short… :sunglasses:

:water_buffalo:

4 Likes

Very nice! You’re a madman, BirdIsTheWord!

For your last three pictures… you need another spiro… going in the opposite direction… layed atop.

That’s when ya get the true top-of-pine-cone effect. :slight_smile: (bottom of the pinecone?)

The conch shell… that’s a ho-nutha story. If you put a properly?-rotated plane at each point, would it look like a pine-cone/pine-apple? hmm.

0 + 1 = 1
    1 + 1 = 2
        1 + 2 = 3
            2 + 3 = 5
                3 + 5 = 8
                    5 + 8 = 13
                        8 + 13 = 21

etc. a 4-year old could calc Fibonacci numbers. And a 4 year old would tend to pick-up and examine two of the MOST interesting shapes on the planet… pine cones and conch shells/snails.

Fibs happen UNBELIEVABLY often in nature… from fruit shapes to ear shapes to fist shapes to cochlea shapes. Musical harmony is based upon Fibonacci/Phi relationships. Mankind hasn’t invented the conch-shell shaped loudspeaker system yet, but its coming.

It makes one think… that just maybe… there is an extremely low frequency (elf) musical harmony that happens across the entire planet… and everything that grows and lives… can hear this “chord”, and grows the way it does… BECAUSE-of that. Perhaps, one of the secrets of life.

I think the Bird was able to “tune-in” to that sound, here. :slight_smile: He’s ridin’ the fib. :slight_smile: Nice stuff, aF!

1 Like

Woo-hoo!

Noob with MATH… what could happen? :face_with_raised_eyebrow:


>Rornado SPIN with TWO Fibonacci's??? :open_mouth: :drums:

cloud material, and a wobble…

Down there in (y>0 && y < 15).

Got a ribbon-wave anm, flip it on the side…

BIG DustCloud nice!


It should be a module. Open-sourced.

To promote Babylon …

BABYLON.Tornado


simulate tornado and :cow2:


:pray:

Jk. : )


Wait :pineapple: ?

What, :conch-shells:?


Oh man! :black_heart: conch-shells!

image


Oh yeah, because of the sound… cool. heard about that (maybe from you two years ago!). Lol.


image


That format is brilliant…

0 + 1 = 1
    1 + 1 = 2
        1 + 2 = 3
            2 + 3 = 5
                3 + 5 = 8
                    5 + 8 = 13
                        8 + 13 = 21

Because → (Rhythms) :

0 + 1 = 1
0    1 + 1 = 2
0    1    1 + 2 = 3
0    1    1    2 + 3 = 5
0    1    1    2    3 + 5 = 8
0    1    1    2    3    5 + 8 = 13
0    1    1    2    3    5    8 + 13 = 21

image


image

1~3~5?


image

: )

Someday…


Q: How to reverse fib… ?

A: Flip the sin and cos!

1 Like

Ok, caught up to TWC: Roller-coaster Experiments.

showing Normals

Is there easy way to set ALL normals to BV3(0,1,0)?

UPDATE: Yes, but it wasnt the answer.

1 Like

TRYING TO FLIP THE SPIRAL:

All FAILS ~ with a special awesomeness. : )

https://www.babylonjs-playground.com/#6Q89LE

GOT IT!

Flip the sinius and the cosinius. Electric!

// points.push( new BABYLON.Vector3((Math.sin(theta)) * (calcFibNum(i)/fibScale), graduatedY, (Math.cos(theta)) * (calcFibNum(i)/fibScale)) ) //fabric
   points.push( new BABYLON.Vector3((Math.cos(theta)) * (calcFibNum(i)/fibScale), graduatedY, (Math.sin(theta)) * (calcFibNum(i)/fibScale)) )

… ok, so sin and cos are circle left… and circle right then? Got it. Goin with that…

1 Like

Here it is:

It’s breathtaking…

PG: BABYLON.Tornado

Thank you @Wingnut :bowing_man:

2 Likes

Fantastic, aF! I bookmarked that playground SO HARD, that I sprained my finger! :slight_smile:

Free-discussion tag, eh? Look out! :slight_smile:

Once upon a time…
…Wingnut re-established The Wingnut Chronicles, a place to post without following ANY rules and regulations about what to talk about (within reason). Wingnut had a grand idea… tag the new TWC as “free-discussion”.

Well, the new forum remembered that tag, and offered it to others in the tags pull-down list… and people started using it OFTEN. I ran crying to @deltakosh about everyone using my copyrighted tag… err… no… not about that. I told DeltaKoshoggi that I had made a mistake by using it. It is actually antithetical-to/opposite-of … the purpose of tags.

He agreed. Soooo… Deltag began the SLOW forum-admin process of removing the ‘free-discussion’ tag from the tags list, and from MANY MANY user-posts… one-by-one. (hug)

But obviously, he wasn’t able to remove all the cancer… and it came back. :slight_smile:

Way to go, destroying the forum, Wingy! “They” warned me about freedom of expression, and freedom of speech, and freedom to hate things, and freedom to tell jokes about Eskimos, and freedom to label cost-of-living as a terrorist, and freedom to paint my face yellow.

They said “DON’T PROMOTE FREE ANYTHING… or you will ruin the tags system on a forum!”

I didn’t listen, and their prediction came true.

Yeah, thanks for ruining the “be under-control” part of this hallucination of a reality, Wingnut! :smiley:

I’m going to deflect the blame onto Bohm. Bohm died before he had time to learn the relationshippingcharge between enfolding and Fibonacci.

Did you know that I once tried to use the floor joists of a dance club… as the woofers for our band’s speaker system? 20,000 watts of power amps! The dance floor collapsed and fell into the basement… in the middle of the 3rd set.

Nah, that’s a total lie. Good story, huh? (snore)

I’m taking a Casio keyboard and those 20,000 watts of power… over to south Minneapolis this summer… to try to activate a Wingnut-discovered Fibonacci vortex that will allow us to launch spacecraft without ANY dangerous thrusting (anti-grav).

(Wingy paints his face pinko-colored and posts pictures in his high school drop-out yearbook.) What ever happened to “cope’n’deal” as a response to the wide-spread “be offended over everything” phenomena?

pg#1 - lots of circular “rings”. (showing spiro-A only) How would a guy increase the number of rings 4x, yet not change the overall size of the vortex? I would like to “smooth” the lines a bit… removing the severe angle-changes. Possible, without a Cray? (thx)

1 Like

Funny Thanks for the laughs. : )


Ironic… the tags: because they were the ONLY ones I was “allowed” to use!

Now, “don’t use em!” - Stahp! :slight_smile:

Not enough :black_heart: 's (is my guess). all kinds of :questionable: tags like: Like “ribbon”, “rig”, “animation” AND “anm”. Also “smartcam” or “cams” (soon!)

OR you can make them???


Anyway - saw your tag “free-discussion” - good idea Wingy! Free discussion: where the sum is greater than the parts => {withinEpsilon()}; So that is why.

Also, maybe you didn’t want the afalcon META-LONG posts on TWC?
Or dont want them here?

Just let me know.


Yes. Falcon-Deep-Dives Experiments inspired by The Wingnut Chronicles(TWC). :trophy:

Good use of MEDIUM. AND advanced communication skillz. Admired. PRACTICING. But yeah, not working for BIRD! (yet) :baby_chick:


SO - if you want afalcon happily remove “free-discussion” tag. NBD.


Cat out of bag! :smiley_cat:
Written in 2015. Similarities are coincidence. “space-train”, “space-cable”. It is a space-ship that is only called - a space-train - crashes on another planet (of course) - not in our solar-system - and some dastardly villain sends out a “bot”, a good bot, to investigate… that is where the STORY begins.

:smiley_cat: That is the hull of the crashed space-train. From epic, in globular-cluster.

@Wingnut, if it were silicone you could ride right up space-cable with a motorcycle!!!

That was supposed to be funny.

Apparently not funny.

It will be a book driven by 3D choices… if hero avoids crashing into a distant planet. Make up any name in credits please! Anyone. So yeah team is working on a “space-elevator” powered by BABYLON. It wasn’t supposed to be a TORNADO (or a flower). There is more. On the 3DPath we use Extrude to make space-cable HALFPIPE.

Anyone wanna SURF a SPACE HALFPIPE?


DEEP~DIVE~BONUS: a few years back, deep-dive on how to PRACTICALLY build space-cable. It is so easy. Ready? Fishing Lines! :grin: Dropped from space! Billions of em. Little elastic fishing lines streaming down from a~space~hub~1! ON KITES. For years, decades even, dropping with a… sinker. And spinner. Then gathered up, clustered at a military base around the SOUTH POLE! The elastic-lines curve naturally into whatever spiral might result… Fib. So that is why.


Happy to help (anyone) with ROLL-MECHANICS, and JUMP-DYNAMICS. Srsly. (below)

~Below: We use ZONES and ZONE-ALARMS. Just an OBSERVER-PATTERN on xyz) . It’s like one line of code! (below)

Another things, Anmz:{}. is how JUMP-RIG works. Here: anmz{jumpMode:{prejump:0,jumpIdx:0,jumpFall:0,jumpBounce:0}. I’ll TRY to make a playground.

Anyone want a JUMP-RIG PG or anm-sequences?


I want to be an author not a “dev” so I … PRACTICE WRITING.
And want to be a 3D artist not an engineer.
So babylonjs is the best in the world.



Ask me to remove “free-discussion” and I will. NBD. But, respectfully, it is not bad. Opposite.

Free discussion is OASIS.


Zones work really well for Smart-Cams.

Anyone want to see Dynamic~Zone~Alarms? And how they can control SmartCams?


Thanks (everyone) for reading. Hope this EPIC JOURNEY benefits YOU. :baby_chick:

More great things… (below)

:eagle:

1 Like

:slight_smile: Great post. Might be forum record bytes. Alright! :slight_smile:
Oh man… heh… SO much to comment-on. First, fishing lines or similar… will not survive the massive heating that IS the reason for shuttle heat tiles.

The shuttle “hung-out” at about 115 nm… same place the ISS orbits. It takes about 90 minutes to circle the earth… which makes the elevator doors hanging below… travel at about what… a gazillion miles per hour ground speed? You’re gonna need some good sneakers to catch that bus stop. :smiley:

Ok, so let’s think geo-stationary… where the comsats roam… always hovering over a single spot on Earth. These comm satellites are at… umm… around 20,000 nm above the Earth? Even your best SpiderWire or Trilene’s top musky line… it’s just not going to hold-up at those lengths. :slight_smile:

You’re thinking about using the ray-casting surf-rider thing… to aim carBody at next point of path… to take care of car pitch, eh? Possible. I think we force Up() into the normals of a Path3d… no probs… using a hacked _compute() like John made. But, IF we use the normals as the car pitch… then they can’t ALWAYS be pure Up(). They must tilt forward and backward. If we use your ray-caster… then maybe THAT will do the car pitching for us. Not sure. Thinkin.

Tunnels, you bet… I need mining tunnels for Space Taxi 3D… coming soon… err… someday.

Space trains. heh. Yep. MANY stories to be done… about being a longshoreman in the space yards. Cheating spouses and labor unrest… fiercely competing propulsion companies… ugly and beautiful. :slight_smile:

I don’t care about removing free-discussion tag… but… it’s curious how it came back… that’s all. That tags system is strange, it seems. I should read the Discourse docs someday.

You growin’ your own peyote up there in the Catskills, Falcon Crest? Must be good stuff. :slight_smile:

TWC or your own thread? I don’t really have a preference for that, either. I guess I prefer the big barfs be in a separate thread… but it doesn’t matter, imho. Just be happy… havin’ good fun with BJS 3D. Best darned math visualizer money won’t buy. Lots of fun people around, too. Lots of smart ones, as well.

heh. That’s never gonna happen. hahaha. Just kidding.

You and @Pryme8 need to meet. You’re both about half-robot… and I think maybe @nasimiasl is part robot, too. You guys would be speaking in pure hex by the end of the first hour of knowing each other, I think. :slight_smile:

And @Deltakosh… he can do microposts that help people with no hand-hold… because… he is a “seed-spitter”. First, he knows about everything + 4 more things. Then… if you ask for help, he spits a seed of info… usually a ref to src code… and if you go look there… it looks like a blank wall of techno. But then ya dig it. Grab the terms, notice the prop names and func names, do some more searches with the terms found in the seed, and POOM… it turns into a flower (or a vegetable) that can be sniffed and eaten. It all happens… cuz he’s a pro seed-spitter and spits VERY accurately. :smiley:

Ok, I guess that’s enough for now. My fingers are numb. PARTY ON!!!

1 Like

Actually I am a beginner.

But Nas && Pryme8 ~ favorite 3D Artists!


@Prym8 the coolest FISH in 3D I’ve ever seen!

and

@nasimiasl - made the coolest ELECTRIC SHOCK!


Shuttle heats because of falling!

… fishing lines drop, not fall, and are light like a KITE.

Down to the polar center - in a 3D wurld.

So it doesn’t MATTER - because it doesn’t have to work! :man_dancing:


geo-synch - near the pole not equator.

PREDICTION: super-massive: spiral~helix (above).

Space-trains cycle up the center.

Sorry. :frowning:

It ALL comes from a gigantic book…


Anyway… in an alternate galactic-cluster - where gravity is 0.85 - so it does work!


And powered by BABYLON.


YES - car pitch by raycast from origin on vector (1,0,1) : )

Works great! There is another part to it in the TILT-RIG link…

a floating ball in front with a LookAt() - is how it TILTS!

Wish I knew the Dot product, AND Cross() - but don’t, (yet)- almost there!

Lol


I try to Practice Writing. So bad. So, so… bad. :frowning:

Words are all wrong the first 10 times!

Eventually I get them right…

Thank you Gentlemen.

:pray:

Bird builds halfpipe now.

~
:bird:

2 Likes

Question:

Because of Wingnut’s Brilliance. Found JohnK’s awesome work(?) in playground: Babylon.js Playground

See (what Wingy saw): REORDER OF PARAMETERS to RotationFromAxis(a,b,c).

Whoah that is a surprise!

How to define the ROLL of each extrusion…?

This is Halfpipe for Surfing and space-trains. ALSO excellent bob-sled track for Wingy Toboggan!!!

I’ll make PG.

How to ROLL each extrusion precisely?

Looking…

Tough challenge.

A: Nope, wrong~trench. Just need to step-into ExtrudeShapeCustom… (below)

… the anwer is there. : )

FAILED ATTEMPT to ROLL the HALFPIPE…


Turn it into a tornado… :rofl:
:black_heart:

AMAZING!

Able to snap this screenshot just before…

NOTE: spinning a halfpipe - NOT the best way to make tornado.


BABYLON.Tornado.

2 Likes

Ok Focus Falcon!

So it is NOT the Y that comes out of RotationFromAxis.

Maybe it is ALL the Normals going INTO the first param… of RotationFromAxis( change me, 2, 3)

Check out these normals:

Great VORTEX on the normals!

From inside the tornado:


Did not Crash!

Space~Tornado:

1 Like

Gorgeous grabs/experiments, aFalcon! Well done!

Yep. Sounds like you were back-reading TWC… catching-up on what’s been done. John’s compute() hack doesn’t honor the firstNormal (optional 3rd param) of Path3d constructor, and it doesn’t calc the path3d.distance array (no biggie). But… it allows good carBody pitching (although banking/roll is not overly controllable yet).

But the main thing that @JohnK’s hack accomplished… is a fix for the problem of a difference in normals angle… where start meets end. We WERE getting a “rotation jerk” at the start-meets-end point… caused by firstNormal not matching lastNormal. They had approx a 35 degree difference in roll (z-rot).

So, we’re really nowhere. My latest tests were to grow the Path3d, and then use its _curve/points values… in a standard BJS Animation… which works fine… because it doesn’t use normals, binormals, or tangents from path3d. It only uses the point positions, and thus… no pitching… everything is up.

Default _compute() and _normalVector() are in-playground (not hacked). Those are the funcs that create path3d normals/binormals/tangents… so it is a place to modify things… someday.

Line 219 uses an Up() as the firstNormal parameter. Down() also works… as does Left(), Forward(), etc, etc. That works because of using default/stock _compute/_normalVector funcs… but you can see the normals diff where start meets end.

More complicated BS:
Look at lines 281-283. 3 anims. First one - line 281… a vec3 anim for positions. You see it running via line 339.
The other two… yawdrive and pitchdrive, both FLOAT anims, are not running. You can start them by changing array in line 339… to [posdrive, yawdrive, pitchdrive].

BUT… in line 298 area, and 308 area… I’m still experimenting with what value to use in the keyframes for yawdrive and pitchdrive. Seeing that I am using animation to move and rotate this version, rotationFromAxis is completely unused.

Ok, that’s that. I’d really PREFER that rotationFromAxis IS used… and not BJS animation… but this was an experiment. In order to use rotationFromAxis method (line 267 area)… the Path3d normals, binormals, and tangents need to be PERFECT and fully tweak-able… and no “angle diffs” where end meets start.

I’ve done SOME hacking on _compute and _normalVector… mostly hunt’n’peck. Lines 313-320 is the area to allow viewing of binormals and tangents. Currently showing only normals.

AND… initial carBody rotation and baking is an issue. What is the correct starting rotation for the carbody? Who knows?

Lots of crap happening, eh? John’s “draw” towards starting with a flat path… is wise… but then when we start adjusting (stretching/warping) that circle to have long curves and hills and valleys… the points change distance from each other, which kills consistent path-traveling speeds.

But it is the curves, hills, and valleys… that are screwing-up our normals/binormals consistency… which means we need CUSTOM _compute() and possibly custom _normalVector().

It’s a great learning opportunity. We have excellent visualization tools in front of us… and all the time in the world… to play. Later, we might have terrain-following and skyscraper-avoidance options in our path-generator. It’s a wide-open area of study.

https://www.youtube.com/watch?v=YvRmZZZEzF8

All left turns? Hell, OUR paths are better than theirs. :slight_smile: I bet they don’t even bother putting fuel in the right-wing tank. :smiley:

1 Like

Awesome. Up() to speed, and putting cycles on it today.

MISSION: adjust the normals - FOR HALFPIPE ROLL-BANK CORNER SOLUTION.

PG of Single HalfPipe

NOTE: showing normals (blue) also there is a FIBONACCI ALGORITHM OPTIMIZATION (almost) ready to go.

NOTE: this DOES work with the RayCast TILT-RIG. It has been surfed, and is gr8. Please test with all manner of craft. But probably, wear a helmet.


PG of Tornado

INTERESTING, the normals visualize… the VORTEX!?!

Code WAS assembled in hurricane force winds so all the debris is in progress… so…
[wear a helmet] :rescue_worker_helmet:

1 Like

SUCCESS: Optimized the Fibonacci algorithm -

    //Fibonacci-Calculator. idx is the index of num in the fib sequence. 
    //Ex: idx 6 always returns 13 fib.
    function calcFibNum(idx){
        var a = 1, fib = 0, temp;
        while (idx >= 0){
            temp = a;
            a = a + fib;
            fib = temp;
            idx--;
        }
        return fib;
    } //EXAMPLE: calcFibNum(1...n)//1,1,2,3,5,

    //getFibonacciNum. OPTIMIZED - pass in last two numbers, return the next.
    //DO NOT recalculate fib for every IDX. Just inch-worm with local scope-.
    function getFibNum(fib){
        var nextFib = fib.lastFib + fib.thisFib;
        return {thisFib:nextFib,lastFib:fib.thisFib};
    } //EXAMPLE: getFibNum(  {lastFib:0,thisFib:1}  )//1,2,3,5,8

getFibNum is a good (local) Fibonacci calculator for many things.

Good.

PG updated.

So much reading to do in the CLASS Mesh.CreateLines - returns what? LinesMesh?

Ok then, Deep-Dive!
https://doc.babylonjs.com/api/classes/babylon.linesmesh

Stepping into ExtrudeShape… to see which it uses? :rescue_worker_helmet:

BINGO! :slight_smile:

    /**
     * Creates an extruded shape mesh.
     * The extrusion is a parametric shape :  http://doc.babylonjs.com/tutorials/Parametric_Shapes.  It has no predefined shape. Its final shape will depend on the input parameters.
     * tuto : http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#extruded-shapes
     *
     * Please read this full tutorial to understand how to design an extruded shape : http://doc.babylonjs.com/tutorials/Parametric_Shapes#extrusion
     * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be
     * extruded along the Z axis.
     * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.
     * The parameter `rotation` (float, default 0 radians) is the angle value to rotate the shape each step (each path point), from the former step (so rotation added each step) along the curve.
     * The parameter `scale` (float, default 1) is the value to scale the shape.
     * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL
     * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#extruded-shape
     * Remember you can only change the shape or path point positions, not their number when updating an extruded shape.
     * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
     * Detail here : http://doc.babylonjs.com/tutorials/02._Discover_Basic_Elements#side-orientation
     * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture.
     * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
     */
    MeshBuilder.ExtrudeShape = function (name, options, scene)

LOVE - that options object!!! :black_heart:

  • The parameter rotation (float, default 0 radians) is the angle value to rotate the shape each step (each path point), from the former step (so rotation added each step) along the curve.

NOTE-TO-SELF: read source-code FIRST!

WrongTrench. But I’ll be back for you CatmullRomSpline!

https://doc.babylonjs.com/how_to/parametric_shapes

Source-code CLEARLY directs US to the next PHASE of the HALF-PIPE JOURNEY:

GOLD: Mesh.ExtrudeShapeCustom

SOLUTION:

  • The parameter rotationFunction (JS function) is a custom Javascript function called on each path point.

That! :snowboarder:

1 Like

SOLVED :heavy_check_mark:

SOLUTION:

var scaleFn = function () { return 1; };
var rotateFn = function () { return 0; };
var halfpipe2 = BABYLON.MeshBuilder.ExtrudeShapeCustom("halfpipe", 
{shape:halfpipeShape,path:curve,scaleFunction:scaleFn,rotationFunction:rotateFn,ribbonCloseArray:false,ribbonClosePath:false,
    updatable:true,sideOrientation:BABYLON.Mesh.DOUBLESIDE},nx.scene);

Very cool!

UPDATED SPACEPIPE PG

Gotta keep moving…

Time to SURF~POLAR~VORTEX~HALFPIPE! :snowboarder:

image

:black_heart: :eagle:

1 Like

There was an error in my MATH… Fixed Fibonacci - but exactly the same as a few years ago… it ended up NOT being the curve that was needed. :frowning:

Still important Fibonacci algorithm update.

later. Really interesting…