~ubuntu-branches/ubuntu/lucid/structure-synth/lucid

« back to all changes in this revision

Viewing changes to Examples/Tutorials/TriangleComposites.es

  • Committer: Bazaar Package Importer
  • Author(s): Miriam Ruiz
  • Date: 2009-04-13 13:28:45 UTC
  • Revision ID: james.westby@ubuntu.com-20090413132845-d7d42t4llxjxq0ez
Tags: upstream-0.9
ImportĀ upstreamĀ versionĀ 0.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// This example shows how to build
 
2
// custom primitives from individual polygons.
 
3
// Note that the Triangle primitives are NOT supported
 
4
// by most of the templates.
 
5
 
 
6
5 * { x 2 } 5 * { y 2 hue 20 } house
 
7
 
 
8
rule house {
 
9
        { color black s 1.01 } grid
 
10
       box
 
11
        { z 1 sat 0.4 } pyramid
 
12
}
 
13
 
 
14
rule house {
 
15
        { color black s 1.01 } grid
 
16
         box
 
17
        { z 1 } bar
 
18
}
 
19
 
 
20
rule pyramid { 
 
21
         triangle[0,0,0;1,0,0;0.5,0.5,0.5] 
 
22
         triangle[1,0,0;1,1,0;0.5,0.5,0.5] 
 
23
         triangle[1,1,0;0,1,0;0.5,0.5,0.5] 
 
24
         triangle[0,1,0;0,0,0;0.5,0.5,0.5] 
 
25
 
26
 
 
27
rule bar { 
 
28
         triangle[0,0,0;1,0,0;0.5,0,0.5] 
 
29
         triangle[1,0,0;1,1,0;0.5,0,0.5] 
 
30
         triangle[0.5,0,0.5;1,1,0;0.5,1,0.5] 
 
31
         triangle[0,1,0;0.5,1,0.5;1,1,0] 
 
32
         triangle[0,0,0;0.5,0,0.5;0,1,0] 
 
33
         triangle[0.5,0,0.5;0.5,1,0.5;0,1,0] 
 
34
 
 
b'\\ No newline at end of file'