Hi i recently found Context Free and i think its a great program, being a new user i am not yet able to code very complex things so what i find best at the moment is modifying the examples from the gallery and replacing SQUARE with TRIANGLE and changing values. As far as i know theres only 3 shapes at the moment but with only these 3 theres already a huge amount of options available so how about adding some more of these shapes, i was thinking a Hexagon and diamond would be cool.
Also maybe add the option to modify with SIN COS TAN ect which would also allow for alot more cool things, hope you like my ideas, thanks
More basic shapes
Moderators: MtnViewJohn, chris, mtnviewmark
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
We are thinking of allowing for more complex static expressions. But in the mean time you should experiment with the [] syntax: The original {} syntax ignores the order of the transformations in the cfdg file and does them in a fixed order: translate (x & y), size, rotate, skew, and flip (if any).
The [] syntax does the opposite: transforms are applied in the order that they are in the cfdg file. The second TRIANGLE in the example rotates the coordinate system 30° and then translates 5 units on the x axis in the rotated coordinate system. The 3rd TRIANGLE does a 2nd coordinate space rotation after the translation.
This is not as versatile as have generalized expressions with trig functions. But being able to put the rotation before the translation eliminates some of the reasons for needing trig functions.
Code: Select all
startshape foo
rule foo {
CIRCLE {}
TRIANGLE { r 30 x 5 }
TRIANGLE [ r 30 x 5 ]
TRIANGLE [ r 30 x 7 r 30 ]
}
The [] syntax does the opposite: transforms are applied in the order that they are in the cfdg file. The second TRIANGLE in the example rotates the coordinate system 30° and then translates 5 units on the x axis in the rotated coordinate system. The 3rd TRIANGLE does a 2nd coordinate space rotation after the translation.
This is not as versatile as have generalized expressions with trig functions. But being able to put the rotation before the translation eliminates some of the reasons for needing trig functions.