File: triples.cfdg

package info (click to toggle)
contextfree 3.4.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,448 kB
  • sloc: cpp: 37,995; lex: 414; makefile: 123; sh: 43; python: 34
file content (61 lines) | stat: -rw-r--r-- 947 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
startshape TRIPLES

shape TRIPLES
{
	LINES [ r 0 ]
	LINES [ r 120 ]
	LINES [ r -120 ]
}	

shape LINES
{
	UTRIANGLE [ y 0.5 ]
	LINES [ r 20 b 0.15 y 0.75 x -0.4330125  s 0.754877 ]
	LINER [ r -60 b 0.15 y 0.75 x 0.4330125  s 0.754877 ]
}

shape LINER
{
	UTRIANGLE [ y 0.5 ]
	LINER [ r -15…-6 b 0.02
		y 0.75 x 0.4330125  s 0.754877 ]
}

// 0.754877 is the solution to
// x^2 + x^3 = 1
// this allows double backed
// triangles to exactly line up!


shape TESTU
{
	TESTU_background [ ]
	UTRIANGLE [ ]
	UTRIANGLE [ y 0.5 x -0.866025 b 0.5 r 60 ]
	UTRIANGLE [ y 0.5 x +0.866025 b 0.5 r 60 ]
}
shape TESTU_background
{
	CIRCLE [  b 0.5 ]
	CIRCLE  [ y -1 ]
	CIRCLE [ y -0.5 x -0.866025 ]
	CIRCLE [ y -0.5 x 0.866025 ]
	CIRCLE [ y 0.5 x -0.866025 ]
	CIRCLE [ y 0.5 x 0.866025 ]
	CIRCLE  [ y 1 ]
}

shape UTRIANGLE
{
	transform [ r 42.5 s 0.525 ] {
		ARM [ r 0 ]
		ARM [ r 120 ]
		ARM [ r -120 ]
	}
}

shape ARM
{
	CIRCLE [ ]
	ARM [ y 0.1 s 0.9 r 2 ]
}