More suggested features for 3.0

Let the developers know what you think of the software and what can be done to either improve the CFDG language or the Context Free program.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
User avatar
toxikman
Posts: 2
Joined: Mon Jul 30, 2007 4:59 pm
Location: Seattle, WA

More suggested features for 3.0

Post by toxikman »

Several people have already suggested parameters, and even conditionals based on those parameters. Those ideas are great, as well as the idea of context-free expressions to help generate relative values. The expression that I REALLY want is RAND(a, b). This would save so much code when it comes to generating random values in a range.

Code: Select all

RULE branch(@param)
{
    SQUARE { s 0.1 1 }
    branch { y 1 r (@param * RAND(0.5, 1)) s 0.99 }
    branch { y 1 r (@param * RAND(-1, -0.5)) s 0.99 }
}

User avatar
LazyMoon
Posts: 20
Joined: Sun Aug 13, 2006 2:52 am
Location: Adelaide, Australia
Contact:

Post by LazyMoon »

A random function would save so much time.

Seeing as a lot of us have been using multiple rules with minute changes all this time to accomplish the same thing.

I think the random function should have three arguments though, the min value, the max value and a step value. So that way you can generate a random number between 1 and 2, yet confine the result so it only appears as multiples of 0.10; i.e. 1.10, 1.20, 1.30 etc.
"Bound By Reason, We Are Free In Our Imagination"
View My CDFG Gallery

User avatar
toxikman
Posts: 2
Joined: Mon Jul 30, 2007 4:59 pm
Location: Seattle, WA

Post by toxikman »

Yes, a step would be very helpful indeed.

User avatar
MtnViewJohn
Site Admin
Posts: 875
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Post by MtnViewJohn »

A random integer function would be easier to implement and more generally useful (in addition to a random float function).

Post Reply