beginner cos question

If you're having trouble using Context Free or don't understand the language, ask for help here.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
dani
Posts: 1
Joined: Mon Aug 25, 2008 4:04 am
Location: Ithaca
Contact:

beginner cos question

Post by dani »

Hi folks,

I just started learning this amazing language and typed the following which did not work (the line with the cos)

startshape S1

rule S1 {
S2 {sat 1 b 1 hue |60}
}

rule S2 {

SQUARE{ x 0 y 0}
S2 { r -1
s (1/cos(85)) //this line does not work
hue 0.1|}
}

why does it work?
s 0.95 works.

Thanks,

--Dani

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

Post by MtnViewJohn »

Are you running version 2.2? Expressions only work in 2.2. It worked fine for me once I changed hue |60 to |hue 60. However 1/cos(85) is greater than one, so the design is infinitely large.

Post Reply