-
Notifications
You must be signed in to change notification settings - Fork 0
/
tete-de-moine.gle
84 lines (74 loc) · 2.66 KB
/
tete-de-moine.gle
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
!----------------------------------------------------------------------------
! Copyright 2014 Jacques Supcik, EIA-FR
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
! You may obtain a copy of the License at
!
! http://www.apache.org/licenses/LICENSE-2.0
!
! Unless required by applicable law or agreed to in writing, software
! distributed under the License is distributed on an "AS IS" BASIS,
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
! See the License for the specific language governing permissions and
! limitations under the License.
!----------------------------------------------------------------------------
!
! Centreur de «Tête de Moine» / Jacques Supcik / 2014-07-20
!
!----------------------------------------------------------------------------
size 10.6 10.6
!----------------------------------------------------------------------------
! Color definition for Trotec 300 laser cutter
!----------------------------------------------------------------------------
Black$ = "rgb255(000,000,000)"
Red$ = "rgb255(255,000,000)"
Blue$ = "rgb255(000,000,255)"
Desert$ = "rgb255(051,102,153)"
Cyan$ = "rgb255(000,255,255)"
Green$ = "rgb255(000,255,000)"
Grass$ = "rgb255(000,153,051)"
Forest$ = "rgb255(000,102,051)"
Olive$ = "rgb255(153,153,051)"
Brown$ = "rgb255(153,102,051)"
Walnut$ = "rgb255(102,051,000)"
Plum$ = "rgb255(102,000,102)"
Purple$ = "rgb255(153,000,204)"
Magen$ = "rgb255(255,000,255)"
Orang$ = "rgb255(255,102,000)"
Yellow$ = "rgb255(255,255,000)"
!----------------------------------------------------------------------------
! Defaults
!----------------------------------------------------------------------------
set lwidth 0.01
set join round
set cap round
set font texcmss
!----------------------------------------------------------------------------
! Subroutines
!----------------------------------------------------------------------------
sub cut r1 r2 a a2
amove r1*cos((a-a2)/180*pi) r1*sin((a-a2)/180*pi)
aline r2*cos((a-a2)/180*pi) r2*sin((a-a2)/180*pi)
amove r1*cos((a+a2)/180*pi) r1*sin((a+a2)/180*pi)
aline r2*cos((a+a2)/180*pi) r2*sin((a+a2)/180*pi)
amove 0 0
arc r2 a-a2 a+a2
arc r1 a-a2 a+a2
end sub
!----------------------------------------------------------------------------
! Main
!----------------------------------------------------------------------------
sub main
set color Red$
amove 0 0
circle 0.6
for a = 0 to 360-30 step 30
cut 2.255 4.6 a 6
next a
set color Blue$
circle 5.2
end sub
begin translate 5.3 5.3
main
end translate