POV-Ray : Newsgroups : povray.general : L-Systems in Povray : Re: L-Systems in Povray Server Time
23 Apr 2024 18:42:05 EDT (-0400)
  Re: L-Systems in Povray  
From: ingo
Date: 5 Jun 2023 13:25:00
Message: <web.647e1a39453cebfc17bac71e8ffb8ce3@news.povray.org>
"ingo" <nomail@nomail> wrote:
>
> ---%<------%<------%<---
> Pov-Ray    : 3.8
> Scene File : lsys.pov
> Author     : Ingo Janssen
> Date       : 2023-06-04
>
> #version 3.8;
>
> global_settings{ assumed_gamma 1.0 }
> #default{ finish{ ambient 0.1 diffuse 0.9 }}
>
> //build rules
> #declare BuildRules = dictionary;

A little bit of code to stick to the end of the lsys.pov scene file, render and
have a look in your source directory.

Just for fun and again, a little crude:

---%<------%<------%<---

#declare Height = 10;
#declare Width = 10;
#declare StrokeWidth = 0.3;
#declare FileName = "SVGfile.svg";

#fopen SVG FileName write
#write (SVG concat("<svg xmlns=\"http://www.w3.org/2000/svg\" height='",
str(Height,0,0), "' width='", str(Width,0,0), "' fill='blue' stroke='blue'
stroke-width='", str(StrokeWidth,0,3),"'>\n"))

#for(i, 0, dimension_size(Vertices,1)-2)
  #declare Line = concat("<line x1='", str(Vertices[i].x,0,1),"'
y1='",str(Vertices[i].y,0,1),"' x2='",str(Vertices[i+1].x,0,1),"'
y2='",str(Vertices[i+1].y,0,1),"'/>\n") ;
  #write(SVG Line)
#end
#fclose SVG

---%<------%<------%<---


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.