We have this discussion from time to time. It's older but I like the math in this book:
https://www.amazon.com/Twist-Turn-Fr.../dp/1885588100
One of the places I've recommended that is in this thread here, which has some other info and places to get other techniques as well!
How to make a floating Block