// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8 ======= 9 ======= 10 /* https://github.com/t-o-k/POV-Ray-L-system Copyright (c) 2023 Tor Olav Kristensen, http://subcube.com Use of this source code is governed by the GNU Lesser General Public License version 3, which can be found in the LICENSE file. */ // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8 ======= 9 ======= 10 #version 3.7; #include "L-system.inc" global_settings { assumed_gamma 1.0 } default { texture { pigment { color rgb <1, 1, 1> } finish { diffuse 0 emission color rgb <1, 1, 1> } } } // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8 ======= 9 ======= 10 // Some sort of Pythagoras tree adapted from P. Bourke, http://paulbourke.net/fractals/lsys/; his original does not work with this L-System // L_Sys\ls_plants01.pov // // Variables #declare Rules[asc("F")] = "F"; #declare Rules[asc("X")] = "FF[-FX][+FX]"; InsertNoChangeFunctions(Functions, "X") #declare Axiom = "FFFFX"; #declare Iterations = 9; #declare StackSize = 2*Iterations; #declare L_string = L_Transform(Axiom, Rules, Iterations); #declare pStart = < 0, -22, 0>; #declare InitialLength = 2.0; #declare InitialRadius = 0.1; #declare InitialHeading = radians(+90.0); #declare InitialTurnAngle = radians(+25.7); // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8 ======= 9 ======= 10 union { L_Draw( Functions, L_string, StackSize, pStart, InitialLength, InitialRadius, InitialHeading, InitialTurnAngle, true, true ) pigment { color srgb <0.99, 0.75, 0.29> } } // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8 ======= 9 ======= 10 background { color srgb <0.00, 0.19, 0.29> } #declare Scale = 32; camera { orthographic location -100*z direction z right Scale*4*x up Scale*3*y } // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8 ======= 9 ======= 10