Context Free Art

Talk:Reference Card

From Context Free Art

Jump to: navigation, search

Wondering about clarifying absolute and proportional changes

According to Color Adjustments as it is currently written, including "hue 30" to a shape should shift its color by 30° around the color wheel each time the shape is called. Why, then, in the simple program below, does the color remain a very consistent orange, which is 30° on the wheel? Perhaps the Reference Card can be clearer on when a change is an absolute change, and when it is relative? Or am I missing some point about context free grammar?

hue num h num :: add num to the hue value, wrapping from 360° to 0°

  1. startshape trunk
  2. rule trunk {
  3. SQUARE{ hue 30 brightness 0.8 saturation 0.8}
  4. trunk{ y 0.5 s 0.5}}

Answer:

Try this

  1. startshape trunk
  2. rule trunk {
  3. SQUARE{ brightness 0.8 saturation 0.8}
  4. trunk{ y 0.5 s 0.5 hue 30 }}

The explanation is that the colour of "trunk" in yours is always hue=0, or red. The is because "trunk" starts off at h=0 (red) and at each generation spawns one "SQUARE" (with hue shifted to 30) and one "trunk" (with hue unchanged). In mine, successive "trunk"s have hues 0,30,60, etc and so the SQUARES just inherit their hue value from the trunk, but add in brightness and saturation values. HTH Kipling 16:30, 29 April 2009 (PDT)

PS incidentally, the forums are a better place for questions - you can't rely on anyone reading this! Kipling 16:34, 29 April 2009 (PDT)

Views
Personal tools
Navigation
Toolbox
MediaWiki
Attribution-Share Alike 2.5
book coverSee our book:
Community of Variation