background preloader

CFDG

Facebook Twitter

CFDG HOWTO - Context Free Art. Eine CFDG-Datei besteht im Wesentlichen aus Regeln für das Zeichnen von Figuren, die wiederum aus anderen Figuren bestehen. Dazu kommen einige optionale und eine obligatorische Komponente: Eine obligatorische startshape-Anweisung, die Context Free/CFDG mitteilt, mit welcher Form gestartet werden soll. Es muss mindestens eine startshape-Anweisung geben. Gibt es mehrere, so wird die Erste (Oberste) verwendet. Eine optionale background-Anweisung, die Context Free/CFDG mitteilt, welche Hintergrundfarbe verwendet werden soll. Beispiel: /* Beispielhafte CFDG Datei Dies ist ein Block-Kommentar */ // Dies ist die eine Moeglichkeit eines Zeilenkommentars # Dies ist die Andere startshape Foo /* Es muss eine startshape-Anweisung geben. */ include kram.cfdg /* Bindet Regeln und path-Anweisungen von kram.cfdg ein. */ background { b -1 } /* Aendert den Hintergrund in Schwarz. */ tile { s 3 4 } /* kachelt das Design in ein Gitter.

Context-free grammar. V → w where V is a single nonterminal symbol, and w is a string of terminals and/or nonterminals (w can be empty). A formal grammar is considered "context free" when its production rules can be applied regardless of the context of a nonterminal. No matter which symbols surround it, the single nonterminal on the left hand side can always be replaced by the right hand side. Context-free grammars arise in linguistics where they are used to describe the structure of sentences and words in natural language, and they were in fact invented by the Linguist Noam Chomsky for this purpose, but have not really lived up to their original expectation.

In linguistics, some authors use the term phrase structure grammar to refer to context-free grammars, whereby phrase structure grammars are distinct from dependency grammars. Background[edit] John, whose blue car was in the garage, walked to the grocery store. can be logically parenthesized as follows: Formal definitions[edit] where A production rule in and . Context Free Art. Context Free Art Context Free is a program that generates images from written instructions called a grammar.

This HSV color picker may be useful for color settings. Directives startshape shape A script must start with this directive . Primitive shapes Context Free knows how to draw squares, circles and triangles. Geometric adjustments A shape passes on its geometry to the shapes that replace it when a rule for the shape is executed. Color adjustments Color adjustments, based on the HSV color model , may also be applied to replacement shapes. Path operations.

Context free art. Mathematische Bilder erstellen mit Context Free | vismath. In der Blo­grei­he „Wie er­stellt man ma­the­ma­ti­sche Bilder? “ stel­len wir Werk­zeu­ge vor, mit denen man ein­fach hoch­wer­ti­ge ma­the­ma­ti­sche Bilder er­stel­len kann. Dieser Ar­ti­kel be­fasst sich mit dem Pro­gramm Con­text Free und zeigt, wie man damit Ob­jek­te vi­sua­li­sie­ren kann, die über ge­wis­se Er­set­zungs­re­geln de­fi­niert sind. Kontextfreie Grammatiken und Fraktale Con­text Free ist ein Pro­gramm, mit dem man Ob­jek­te zeich­nen kann, die sich über ge­wis­se Re­gel­er­set­zun­gen be­schrei­ben lassen. Der Be­griff „kon­text­freie Gram­ma­tik“ stammt aus dem Gebiet der Com­pu­ter­lin­gu­is­tik. Dabei spie­len Er­set­zungs­re­geln der Form A → BC eine Rolle, die ein exis­tie­ren­des „Wort“ in ein an­de­res „Wort“ über­füh­ren. Ein Bei­spiel für ein ma­the­ma­ti­sches Objekt, das in ganz na­tür­li­cher Weise über solche Er­set­zungs­re­geln er­zeugt werden kann, ist das Sier­pin­ski-Drei­eck.

Context Free Art Installation und Verwendung Beispiel 1: Sierpinski-Dreieck. Context Free Art – Tutorial 1 » Magic & Love Interactive. After we can create different primitive shapes, we start to combine them together. We cannot simply put all the primitive shapes within one single shape rule, like: startshape MyShape rule MyShape { CIRCLE {} TRIANGLE {} SQUARE {} } Multiple shapes Every shape command comes with parameters.

We work with the translation parameters x and y to move the shape around in the canvas. startshape MyShape rule MyShape { CIRCLE {x -2} TRIANGLE {} SQUARE {x 2} } startshape MyShape rule MyShape { CIRCLE {y 2} TRIANGLE {} SQUARE {y -2} } startshape MyShape rule MyShape { CIRCLE {x 2 y 2 size 0.8} TRIANGLE {size 2} SQUARE {x -2 y -2 size 0.5} } Size variation. Context Free Art - Simple Schoenheit. CFDG: Context-Free Design Grammar. CFDG: Syntax.