Last active
June 16, 2024 11:49
-
-
Save feromes/2c5243a6183c7c6000987ee7b22db086 to your computer and use it in GitHub Desktop.
Fibonacci's spiral in OpenScad using a simple polar equation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//fibonacci_golden_spiral.scad - Simple implementation of the Fibonacci Spiral's polar equation | |
phi = (1 + sqrt(5)) / 2; // =~ 1.618 | |
function radius(angle) = 10 * pow(phi, (angle / 90)); | |
for(i = [0:1:720]) { | |
translate([sin(i) * radius(i), cos(i) * radius(i)]) circle(3); | |
} | |
echo(version=version()); | |
// Written by Fernando Gomes <[email protected]> | |
// | |
// To the extent possible under law, the author(s) have dedicated all | |
// copyright and related and neighboring rights to this software to the | |
// public domain worldwide. This software is distributed without any | |
// warranty. | |
// | |
// You should have received a copy of the CC0 Public Domain | |
// Dedication along with this software. | |
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment