Code Monkey home page Code Monkey logo

solidml's Introduction

Solid Macro Language

Construct fractal-like 3D models by cryptic script based on Structure Synth's Eisen Script. It has a backward compatibility with Eisen Script, and some lazy language specifications (syntax sugers) are added. You can prepare complex 3D models easily and quickly.

Demonstration

https://keim.github.io/SolidML/demo/index.html

Based on and respect for

Structure Synth: http://structuresynth.sourceforge.net/

Eisen Script: http://structuresynth.sourceforge.net/reference.php

Many Lazy Syntax Sugers

  • "set" => "@"
  • "rule" => "#"
  • "#define" => "$" (currently #define is available only inside of {...})
  • "color #ff0" => "#ff0"
  • "color red" => "red"
  • "color random" => "random" or "#?"
  • "blend" => "*"
  • "set maxdepth" => "@"
  • "set maxobject" => "@mo"
  • "set maxsize/minsize" => "@max/min"
  • "set seed 1" => "@s1"
  • "set colorpool grayscale" => "@cp:g0"
  • "set colorpool randomhue" => "@cp:h0"
  • "set colorpool list:blue,red" => "@cp[blue,red]"
  • "set background" => "@bg"
  • "rule R1 weight 2 maxdepth 10 > R2" => "#R1@w2@10>R2"
  • "36 * {" => "36{"
  • "#R{A(B|C)D}" => "#R{ABD} #R{ACD}" (this rule expantion is executed before parsing as a simple text conversion. The extended script is shown in console)
  • "#R{A(w2B|C)D}" => "#R@w2{ABD} #R@w1{ACD}"
  • "#R{(w4A|B)(w2C|D)}" => "#R@w8{AC} #R@w4{AD} #R@w2{BC} #R@w1{BD}"
  • space between number and command can be omitted

Additional concept

  • box, shpere, mesh, tube, triangle, line, grid, cylinder, cone, torus, tetra, octa, dodeca and icosa are available as the built-in rules
  • cmesh (cylinder mesh) and ctube (cylinder tube) are available
  • mesh(cmesh) is under the effect of scaling, tube(ctube) is not (constant width).
  • point is not implemented
  • "set colorpool image:" is not implemented
  • "shpere:16" sets the segment count of 16, "cylinder:n", "cone:n", "mesh:n", "cmesh:n", "tube:n", "ctube:n" are also available
  • "grid:10" sets the edge width in percentage, "line:10" sets the line width in percentage
  • "torus[width,seg1,seg2]" for torus shape
  • "@cp:g5" sets the grayscale colorpool table in 5 tone-steps, "@cp:g0" means no tone-steps.
  • blending only one member sat, bri or hue by "*s0.5,0.1"
  • ... and so on

only for demonstration

  • "@bg[#HEX,#HEX,#HEX]" sets sky, floor and checker board colors.
  • "@mat[10,90,50,30]" sets material metalness, roughness, clearCoat and clearCoatRoughness in percentage
  • "@ao[2,0]" sets ambient occlusion parameters, 0 of the 1st parameter sets disabled.

API Reference

https://keim.github.io/SolidML/jsdoc/index.html

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.