Git Product home page Git Product logo

jolifantobambla / parametric-l-systems Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 5.69 MB

An implementation of parametric L-systems for the Fractals course at TU Wien

Home Page: https://jolifantobambla.github.io/parametric-l-systems/

License: MIT License

HTML 0.19% JavaScript 98.79% Rust 0.54% CSS 0.39% Dockerfile 0.01% Haxe 0.01% Makefile 0.02% Nix 0.01% ABAP 0.01% ActionScript 0.01% Ada 0.01% ASL 0.01% Assembly 0.01% AutoHotkey 0.01% Batchfile 0.01% Zeek 0.01% C++ 0.01% Cirru 0.01% Clojure 0.01% COBOL 0.01%

parametric-l-systems's People

Contributors

jolifantobambla avatar

Watchers

 avatar

parametric-l-systems's Issues

Add default parameters for commands

Abop uses F(d) and !(w) instead of F(d,w).
Add !(w) command, start with 1 as default value and use the default value if F is called with just one parameter.

Similarly, rotations should default to 90 degrees. Add extra commands for rotating counter- & clockwise.

support for query modules

not quite sure how they should function.
I think they need a mutable interpreter that is updated after each production and supplies immutable parameters to conditions and operations

Add l-system dsl

Something like that:

system tree {
            use turtle3d // shorthand for defining all turtle commands

            mod A(l,w)
            mod ~D(i) // ~<name> is special and needs to be defined by the user if used, <name> must be the name of a surface or obj
                      // if <name> names an obj, no param is allowed -> if surface only one iterations param is allowed!

            // params must have a default value
            param r1 = 0.0

            prod {
                1.0; _ < F(w,l) > _: _ -> ~D(w)
            }

            axiom A(100, w0)
        }

        // an instance must be a system
          instance x: tree {
            // an iteration must define the number of iterations
            iterations 15
            r1 = 2.0
        }

       scene {
          material 0 {
              diffuse 1.0, 0.0, 0.0
          }

          ambientlight {
              color 1.0, 1.0, 1.0
          }

          pointlight {
              position 1.0, 0.0, 0.0
              color 1.0, 1.0, 1.0
          }

          

          // only instances can be drawn
          draw x
          draw x with transform { ... }
        }


        // surface & obj commands are something for the future

        // surfaces may only be used in a system
        surface D {
            use surface3d // shorthand for defining all surface commands

            mod X()

            param = ..

            prod {
            }

            axiom
        } with transform {
            1., 0., 0., 0.,
            0., 1., 0., 0.,
            0., 0., 1., 0.,
            0., 0., 0., 1.,
        }

        // objs may only be used in a system
        obj X {
            https....
        } // omitted with transform block defaults to identity

Parse & Execute

  • system block
  • instance block
  • draw command
  • pointlight clock
  • material block
  • transform block
  • surface block
  • obj block
  • material block

Syntax highlighting

  • system block
  • instance block
  • draw command
  • pointlight clock
  • material block
  • transform block
  • surface block
  • obj block
  • material block

Adapt to spec update / update wgpu

(LoadOp::Load) and stencilStoreOp is (StoreOp::Store) when stencilReadOnly (0) or the attachment ([TextureView of Texture "depth texture"]) has no stencil aspect.

  • While validating depthStencilAttachment.
  • While encoding [CommandEncoder "frame command encoder"].BeginRenderPass([RenderPassDescriptor "depth pre-pass"]).

Add test scenes for submission

Features that must be included:

  • conditions for rules
  • parameter sets
  • point lights

Nice to have:

  • multiple objects (incl. transforms)
  • material switching
  • probabilities for rules
  • extra primitives (obj)
  • extra primitives (lsystem surface)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.