Parametric OpenSCAD Koch snowflake generator
Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.
Zapisane na tym urządzeniu.
OpenSCAD code to generate any size and any iteration level of Koch snowflake you desire (actually only using OpenSCAD)
- Ocena
- 0 / 5
- Polubienia
- 7
- Pobrania
- 91
- Wydruki
- 0
- Wyświetlenia
- 436
- Oceny
- 0
Aktualizacja u źródła:
Informacje o modelu
- Źródło
- Printables
- Kategoria
- Math
- Licencja
- GNU General Public License v3.0
I wanted to print a model of a Koch Snowflake but (at the time of creating this) the only model on Printables that claimed to be an OpenSCAD file to generate a Koch snowflake was actually a list of coordinates for a snowflake that was generated using a python script. This was fine and good but it lead me to challenge myself and implement the entire snowflake generation only using openSCAD. So that's what I did.
The code currently comes with two modules and five examples using these modules
Modules:
- Snowflake(Starting_triangle,Iiteration_depth,Height)
Creates a 3D Koch snowflake of a given thickness from a given equilateral starting triangle. - Stepped_Snowflake(Starting_triangle,Iiteration_depth,Start_height,Color_seed)
Creates a 3D Koch Snowflake where each iteration is extruded to a different height.
Examples:
- Simple extruded snowflake
- Stepped snowflake
- Embossed snowflake
- Tile the plane
- Embossed stepped snowflake
Be careful when setting the iteration depth as the number of sides that needs to be calculated for each iteration grows as 3*4^(n-1). Reference rendering times (for preview rendering) on my MacBook Pro 2022 with all 5 examples enabled are:
- n = 0: 0:00:00.031
- n = 1: 0:00:00.036
- n = 2: 0:00:00.044
- n = 3: 0:00:00.084
- n = 4: 0:00:00.214
- n = 5: 0:00:00.756
- n = 6: 0:00:02.973
- n = 7: 0:00:12.514
Im always open for suggestions and feature requests and would be happy about any constructive feedback