Facto-RayO v2.0 explanation: trigonometry

Опубликовано: 16 Июль 2026
на канале: Arrow in my Gluteus Minimus
2,369
137

This video explains how the trigonometry works for my raycasting engine in #factorio:    • Raycasting engine in Factorio 1.0 (unmodde...  
Compact X-Or lookuptable:    • Compact (X-or) Lookup Table, Factorio Comb...  

v1.0: blueprint not provided, v2.0 iteration 1 is superior in many ways use that one instead.
It also used a slightly different formula than the one shown in the video, but it should be equivalent in terms of precision and accuracy.

v2.0 iteration 1: blueprint in factorio forum page: https://forums.factorio.com/viewtopic...

v2.0 iteration 2: blueprint not provided as I do not have a save of this stage, my saves go straight from iteration 1 to 3.
Also in practice the formula for d was slightly different (added some rounding in some steps); to make sure d is always lower than the real value. I don't remember why I did it that way.

v2.0 iteration 3: blueprint in factorio forum page: https://forums.factorio.com/viewtopic...
same remarks as for iteration 2
Also when I said the least squares method doesn't work I meant that simple linear regression doesn't work. The wiggling also used least squares to evaluate the different functions.
If there's demand I might post the code that did the wiggling of the linear functions.
--------
Main channel:    / @arrowinmygluteusmaximus  


twitter:   / arrowgmaximus  
-------
0:00 intro
0:22 simplifications
0:57 v1.0
4:21 v2.0 iteration 1
5:28 v2.0 iteration 2
6:15 v2.0 iteration 3