Hello Proceduralism
Recently I took a baby step at learning Blender. Lazy as I should be, I came across a few things that need not be done in repetition so I ran into the open arms of proceduralism.
I made a basic fence node that spawns meshes on a curve, and I was very happy about the result.

Until I tried a much complex shape then I found my tool was broken.

Notice how off the orientation of the fence wood starts getting? Trust me, I didn’t see it coming.
Well, it worked for the intended use case, the fence for the little toy house…
The plot twist is this; I consider myself to be a problem solver, I wouldn’t have spent 5 years studying computer science only to see this type of problem and pass off without finding the root cause and the solution.
Hats on, and your Dear Sherlock began his investigations.
After trying many ways to fix the orientation, I ended up with results like these…


It was this last result that made me totally frustrated. For some reason I was thinking in trial and error. Hoping this arbitrary rotation will fix it. Then I tried a practical and more reasonable iterative adjustment but I still failed. I realised that Hello Proceduralism wasn’t so basic.

Finally, I decided to start thinking like a modern-day detective(No offence to Sherlock), one with technology to aid his mission.
My First step was to properly try to understand the idea of Tangents, Normals and Binormals. I quickly modelled a gizmo and aligned it with Blender’s coordinate system(being a visual learner).

Then I replaced my test object on the curve with the gizmo to get the local space orientation of the points.
So I had this mess here:

Problem: The tangent, normal and binormals of the points were not generated to align in order… pretty much, they were fuzzy in their orientation.
I reverted to using the rotation supplied by the Curve to Points node, but it still resulted in the same crazy kind of twists and turns.
But at this point, I knew I was close to solving my problems. So I brought out my linear algebra gear, calculated my normal by cross-product-ing the XY-plane projected tangent with my world up forced-aligned binormal… Made a Rotation Matrix out of it and Voila… Problem solved.

The simplicity of the solution is the reason why I love linear algebra so much. I am looking forward to the crazy solutions it will bring me in Shader Programming. Here is the final spiral stairs railing with no weird orientation problem…


Now that my problem is solved, I obviously brought back the tool into my toy house project.
Here is the project link… https://eniola-olawale-portfolio.vercel.app/portfolio/toy-house