Skip to content

Instantly share code, notes, and snippets.

@chmullig
Last active May 18, 2018 00:08
Show Gist options
  • Save chmullig/6a3dc39f0cdaaa56d416d26f912053fa to your computer and use it in GitHub Desktop.
Save chmullig/6a3dc39f0cdaaa56d416d26f912053fa to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
\documentclass[preview]{standalone}
\begin{document}
\[
f(x) = \frac{1}{\sqrt{2\pi\sigma^2}} e^{-\frac{(x - \mu)^2}{2 \sigma^2}}
\]
\end{document}
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
0
SECTION
2
HEADER
9
$ACADVER
1
AC1014
9
$HANDSEED
5
FFFF
9
$MEASUREMENT
70
1
0
ENDSEC
0
SECTION
2
TABLES
0
TABLE
2
VPORT
5
8
330
0
100
AcDbSymbolTable
70
4
0
VPORT
5
2E
330
8
100
AcDbSymbolTableRecord
100
AcDbViewportTableRecord
2
*ACTIVE
70
0
10
0.0
20
0.0
11
1.0
21
1.0
12
210.0
22
148.5
13
0.0
23
0.0
14
10.0
24
10.0
15
10.0
25
10.0
16
0.0
26
0.0
36
1.0
17
0.0
27
0.0
37
0.0
40
341.0
41
1.24
42
50.0
43
0.0
44
0.0
50
0.0
51
0.0
71
0
72
100
73
1
74
3
75
0
76
0
77
0
78
0
0
ENDTAB
0
TABLE
2
LTYPE
5
5
330
0
100
AcDbSymbolTable
70
1
0
LTYPE
5
14
330
5
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
2
BYBLOCK
70
0
3
72
65
73
0
40
0.0
0
LTYPE
5
15
330
5
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
2
BYLAYER
70
0
3
72
65
73
0
40
0.0
0
LTYPE
5
16
330
5
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
2
CONTINUOUS
70
0
3
Solid line
72
65
73
0
40
0.0
0
ENDTAB
0
TABLE
2
LAYER
5
2
100
AcDbSymbolTable
70
1
0
LAYER
5
50
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
0
70
0
6
CONTINUOUS
0
ENDTAB
0
TABLE
2
STYLE
5
3
330
0
100
AcDbSymbolTable
70
1
0
STYLE
5
11
330
3
100
AcDbSymbolTableRecord
100
AcDbTextStyleTableRecord
2
STANDARD
70
0
40
0.0
41
1.0
50
0.0
71
0
42
2.5
3
txt
4
0
ENDTAB
0
TABLE
2
VIEW
5
6
330
0
100
AcDbSymbolTable
70
0
0
ENDTAB
0
TABLE
2
UCS
5
7
330
0
100
AcDbSymbolTable
70
0
0
ENDTAB
0
TABLE
2
APPID
5
9
330
0
100
AcDbSymbolTable
70
2
0
APPID
5
12
330
9
100
AcDbSymbolTableRecord
100
AcDbRegAppTableRecord
2
ACAD
70
0
0
ENDTAB
0
TABLE
2
DIMSTYLE
5
A
330
0
100
AcDbSymbolTable
70
1
0
DIMSTYLE
105
27
330
A
100
AcDbSymbolTableRecord
100
AcDbDimStyleTableRecord
2
ISO-25
70
0
3
4
5
6
7
40
1.0
41
2.5
42
0.625
43
3.75
44
1.25
45
0.0
46
0.0
47
0.0
48
0.0
140
2.5
141
2.5
142
0.0
143
0.03937007874016
144
1.0
145
0.0
146
1.0
147
0.625
71
0
72
0
73
0
74
0
75
0
76
0
77
1
78
8
170
0
171
3
172
1
173
0
174
0
175
0
176
0
177
0
178
0
270
2
271
2
272
2
273
2
274
3
340
11
275
0
280
0
281
0
282
0
283
0
284
8
285
0
286
0
287
3
288
0
0
ENDTAB
0
TABLE
2
BLOCK_RECORD
5
1
330
0
100
AcDbSymbolTable
70
1
0
BLOCK_RECORD
5
1F
330
1
100
AcDbSymbolTableRecord
100
AcDbBlockTableRecord
2
*MODEL_SPACE
0
BLOCK_RECORD
5
1B
330
1
100
AcDbSymbolTableRecord
100
AcDbBlockTableRecord
2
*PAPER_SPACE
0
ENDTAB
0
ENDSEC
0
SECTION
2
BLOCKS
0
BLOCK
5
20
330
1F
100
AcDbEntity
8
0
100
AcDbBlockBegin
2
*MODEL_SPACE
70
0
10
0.0
20
0.0
30
0.0
3
*MODEL_SPACE
1
0
ENDBLK
5
21
330
1F
100
AcDbEntity
8
0
100
AcDbBlockEnd
0
BLOCK
5
1C
330
1B
100
AcDbEntity
67
1
8
0
100
AcDbBlockBegin
2
*PAPER_SPACE
1
0
ENDBLK
5
1D
330
1B
100
AcDbEntity
67
1
8
0
100
AcDbBlockEnd
0
ENDSEC
0
SECTION
2
ENTITIES
0
LWPOLYLINE
5
100
100
AcDbEntity
8
0
62
7
100
AcDbPolyline
90
5
70
1
10
0.000000
20
256.000000
30
0.0
10
233.600000
20
256.000000
30
0.0
10
233.600000
20
51.200000
30
0.0
10
0.000000
20
51.200000
30
0.0
10
0.000000
20
256.000000
30
0.0
0
LWPOLYLINE
5
101
100
AcDbEntity
8
0
62
7
100
AcDbPolyline
90
102
70
0
10
53.237500
20
113.612500
30
0.0
10
53.237500
20
114.628125
30
0.0
10
54.756250
20
114.828125
30
0.0
10
56.271875
20
115.062500
30
0.0
10
57.787500
20
115.337500
30
0.0
10
59.306250
20
115.656250
30
0.0
10
60.821875
20
116.021875
30
0.0
10
62.340625
20
116.446875
30
0.0
10
63.856250
20
116.931250
30
0.0
10
65.371875
20
117.484375
30
0.0
10
66.890625
20
118.112500
30
0.0
10
68.406250
20
118.825000
30
0.0
10
69.921875
20
119.628125
30
0.0
10
71.440625
20
120.531250
30
0.0
10
72.956250
20
121.537500
30
0.0
10
74.475000
20
122.656250
30
0.0
10
75.990625
20
123.896875
30
0.0
10
77.506250
20
125.265625
30
0.0
10
79.025000
20
126.768750
30
0.0
10
80.540625
20
128.409375
30
0.0
10
82.056250
20
130.193750
30
0.0
10
83.575000
20
132.125000
30
0.0
10
85.090625
20
134.206250
30
0.0
10
86.609375
20
136.437500
30
0.0
10
88.125000
20
138.815625
30
0.0
10
89.640625
20
141.343750
30
0.0
10
91.159375
20
144.009375
30
0.0
10
92.675000
20
146.812500
30
0.0
10
94.190625
20
149.737500
30
0.0
10
95.709375
20
152.778125
30
0.0
10
97.225000
20
155.918750
30
0.0
10
98.743750
20
159.143750
30
0.0
10
100.259375
20
162.434375
30
0.0
10
101.775000
20
165.771875
30
0.0
10
103.293750
20
169.131250
30
0.0
10
104.809375
20
172.493750
30
0.0
10
106.325000
20
175.828125
30
0.0
10
107.843750
20
179.112500
30
0.0
10
109.359375
20
182.315625
30
0.0
10
110.878125
20
185.412500
30
0.0
10
112.393750
20
188.371875
30
0.0
10
113.909375
20
191.168750
30
0.0
10
115.428125
20
193.775000
30
0.0
10
116.943750
20
196.165625
30
0.0
10
118.459375
20
198.315625
30
0.0
10
119.978125
20
200.203125
30
0.0
10
121.493750
20
201.809375
30
0.0
10
123.012500
20
203.112500
30
0.0
10
124.528125
20
204.106250
30
0.0
10
126.043750
20
204.771875
30
0.0
10
127.562500
20
205.109375
30
0.0
10
129.078125
20
205.109375
30
0.0
10
130.593750
20
204.771875
30
0.0
10
132.112500
20
204.106250
30
0.0
10
133.628125
20
203.112500
30
0.0
10
135.146875
20
201.809375
30
0.0
10
136.662500
20
200.203125
30
0.0
10
138.178125
20
198.315625
30
0.0
10
139.696875
20
196.165625
30
0.0
10
141.212500
20
193.775000
30
0.0
10
142.728125
20
191.168750
30
0.0
10
144.246875
20
188.371875
30
0.0
10
145.762500
20
185.412500
30
0.0
10
147.281250
20
182.315625
30
0.0
10
148.796875
20
179.112500
30
0.0
10
150.312500
20
175.828125
30
0.0
10
151.831250
20
172.493750
30
0.0
10
153.346875
20
169.131250
30
0.0
10
154.862500
20
165.771875
30
0.0
10
156.381250
20
162.434375
30
0.0
10
157.896875
20
159.143750
30
0.0
10
159.415625
20
155.918750
30
0.0
10
160.931250
20
152.778125
30
0.0
10
162.446875
20
149.737500
30
0.0
10
163.965625
20
146.812500
30
0.0
10
165.481250
20
144.009375
30
0.0
10
166.996875
20
141.343750
30
0.0
10
168.515625
20
138.815625
30
0.0
10
170.031250
20
136.437500
30
0.0
10
171.550000
20
134.206250
30
0.0
10
173.065625
20
132.125000
30
0.0
10
174.581250
20
130.193750
30
0.0
10
176.100000
20
128.409375
30
0.0
10
177.615625
20
126.768750
30
0.0
10
179.131250
20
125.265625
30
0.0
10
180.650000
20
123.896875
30
0.0
10
182.165625
20
122.656250
30
0.0
10
183.684375
20
121.537500
30
0.0
10
185.200000
20
120.531250
30
0.0
10
186.715625
20
119.628125
30
0.0
10
188.234375
20
118.825000
30
0.0
10
189.750000
20
118.112500
30
0.0
10
191.265625
20
117.484375
30
0.0
10
192.784375
20
116.931250
30
0.0
10
194.300000
20
116.446875
30
0.0
10
195.818750
20
116.021875
30
0.0
10
197.334375
20
115.656250
30
0.0
10
198.850000
20
115.337500
30
0.0
10
200.368750
20
115.062500
30
0.0
10
201.884375
20
114.828125
30
0.0
10
203.400000
20
114.628125
30
0.0
10
203.400000
20
113.612500
30
0.0
0
LWPOLYLINE
5
102
100
AcDbEntity
8
0
62
7
100
AcDbPolyline
90
103
70
0
10
53.237500
20
113.612500
30
0.0
10
53.237500
20
114.628125
30
0.0
10
54.756250
20
114.828125
30
0.0
10
56.271875
20
115.062500
30
0.0
10
57.787500
20
115.337500
30
0.0
10
59.306250
20
115.656250
30
0.0
10
60.821875
20
116.021875
30
0.0
10
62.340625
20
116.446875
30
0.0
10
63.856250
20
116.931250
30
0.0
10
65.371875
20
117.484375
30
0.0
10
66.890625
20
118.112500
30
0.0
10
68.406250
20
118.825000
30
0.0
10
69.921875
20
119.628125
30
0.0
10
71.440625
20
120.531250
30
0.0
10
72.956250
20
121.537500
30
0.0
10
74.475000
20
122.656250
30
0.0
10
75.990625
20
123.896875
30
0.0
10
77.506250
20
125.265625
30
0.0
10
79.025000
20
126.768750
30
0.0
10
80.540625
20
128.409375
30
0.0
10
82.056250
20
130.193750
30
0.0
10
83.575000
20
132.125000
30
0.0
10
85.090625
20
134.206250
30
0.0
10
86.609375
20
136.437500
30
0.0
10
88.125000
20
138.815625
30
0.0
10
89.640625
20
141.343750
30
0.0
10
91.159375
20
144.009375
30
0.0
10
92.675000
20
146.812500
30
0.0
10
94.190625
20
149.737500
30
0.0
10
95.709375
20
152.778125
30
0.0
10
97.225000
20
155.918750
30
0.0
10
98.743750
20
159.143750
30
0.0
10
100.259375
20
162.434375
30
0.0
10
101.775000
20
165.771875
30
0.0
10
103.293750
20
169.131250
30
0.0
10
104.809375
20
172.493750
30
0.0
10
106.325000
20
175.828125
30
0.0
10
107.843750
20
179.112500
30
0.0
10
109.359375
20
182.315625
30
0.0
10
110.878125
20
185.412500
30
0.0
10
112.393750
20
188.371875
30
0.0
10
113.909375
20
191.168750
30
0.0
10
115.428125
20
193.775000
30
0.0
10
116.943750
20
196.165625
30
0.0
10
118.459375
20
198.315625
30
0.0
10
119.978125
20
200.203125
30
0.0
10
121.493750
20
201.809375
30
0.0
10
123.012500
20
203.112500
30
0.0
10
124.528125
20
204.106250
30
0.0
10
126.043750
20
204.771875
30
0.0
10
127.562500
20
205.109375
30
0.0
10
129.078125
20
205.109375
30
0.0
10
130.593750
20
204.771875
30
0.0
10
132.112500
20
204.106250
30
0.0
10
133.628125
20
203.112500
30
0.0
10
135.146875
20
201.809375
30
0.0
10
136.662500
20
200.203125
30
0.0
10
138.178125
20
198.315625
30
0.0
10
139.696875
20
196.165625
30
0.0
10
141.212500
20
193.775000
30
0.0
10
142.728125
20
191.168750
30
0.0
10
144.246875
20
188.371875
30
0.0
10
145.762500
20
185.412500
30
0.0
10
147.281250
20
182.315625
30
0.0
10
148.796875
20
179.112500
30
0.0
10
150.312500
20
175.828125
30
0.0
10
151.831250
20
172.493750
30
0.0
10
153.346875
20
169.131250
30
0.0
10
154.862500
20
165.771875
30
0.0
10
156.381250
20
162.434375
30
0.0
10
157.896875
20
159.143750
30
0.0
10
159.415625
20
155.918750
30
0.0
10
160.931250
20
152.778125
30
0.0
10
162.446875
20
149.737500
30
0.0
10
163.965625
20
146.812500
30
0.0
10
165.481250
20
144.009375
30
0.0
10
166.996875
20
141.343750
30
0.0
10
168.515625
20
138.815625
30
0.0
10
170.031250
20
136.437500
30
0.0
10
171.550000
20
134.206250
30
0.0
10
173.065625
20
132.125000
30
0.0
10
174.581250
20
130.193750
30
0.0
10
176.100000
20
128.409375
30
0.0
10
177.615625
20
126.768750
30
0.0
10
179.131250
20
125.265625
30
0.0
10
180.650000
20
123.896875
30
0.0
10
182.165625
20
122.656250
30
0.0
10
183.684375
20
121.537500
30
0.0
10
185.200000
20
120.531250
30
0.0
10
186.715625
20
119.628125
30
0.0
10
188.234375
20
118.825000
30
0.0
10
189.750000
20
118.112500
30
0.0
10
191.265625
20
117.484375
30
0.0
10
192.784375
20
116.931250
30
0.0
10
194.300000
20
116.446875
30
0.0
10
195.818750
20
116.021875
30
0.0
10
197.334375
20
115.656250
30
0.0
10
198.850000
20
115.337500
30
0.0
10
200.368750
20
115.062500
30
0.0
10
201.884375
20
114.828125
30
0.0
10
203.400000
20
114.628125
30
0.0
10
203.400000
20
113.612500
30
0.0
10
53.237500
20
113.612500
30
0.0
0
ENDSEC
0
SECTION
2
OBJECTS
0
DICTIONARY
5
C
330
0
100
AcDbDictionary
3
ACAD_GROUP
350
D
3
ACAD_MLINESTYLE
350
17
0
DICTIONARY
5
D
330
C
100
AcDbDictionary
0
DICTIONARY
5
1A
330
C
100
AcDbDictionary
0
DICTIONARY
5
17
330
C
100
AcDbDictionary
3
STANDARD
350
18
0
DICTIONARY
5
19
330
C
100
AcDbDictionary
0
ENDSEC
0
EOF
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
library(ggplot2)
distribution <- dnorm
distance <- 3
left <- -distance
right <- distance
xpred <- c(seq(left, right, length=500))
x <- c(min(xpred), xpred, max(xpred))
y <- c(0, distribution(xpred), 0)
plot(x, y, type = "l", axes=FALSE, xlab="", , ylab="")
polygon(x, y, col="black")
vlines <- seq(left+1, right-1)
segments(vlines, 0, y1=(distribution(vlines)), lty =2, col="white")
#axis(1,tick = FALSE, line = FALSE, padj = -3.8, col.axis ="white", at=seq(-distance+1, distance-1), labels=c("-2σ", "-σ", "μ", "σ", "2σ"))
svg(filename = "normal_svg.svg")
save
library(ggplot2)
distribution <- dlnorm
distance <- 3
left <- 0
right <- distance
xpred <- c(seq(left, right, length=500))
x <- c(min(xpred), xpred, max(xpred))
y <- c(0, distribution(xpred), 0)
plot(x, y, type = "l", axes=FALSE, xlab="", , ylab="")
polygon(x, y, col="black")
vlines <- c(1, 1.5)
segments(vlines, 0, y1=(distribution(vlines)), lty =2, col="white")
#axis(1,tick = FALSE, line = FALSE, padj = -3.8, col.axis ="white", at=seq(-distance+1, distance-1), labels=c("-2σ", "-σ", "μ", "σ", "2σ"))
svg(filename = "lognormal.svg")
save
echo(version=version());
// surface() can import images, the pixel values are converted
// to grayscale and converted to values between 0 and 100.
// The example takes 3 cuts from the height map and displays
// those as 3 stacked layers.
for (a = [1])
color([a/6 + 0.5, 0, 0])
linear_extrude(height = 2 * a, convexity = 10)
projection(cut = true)
translate([0, 0, -30 * a])
surface("normal.png", center = true);
// Written in 2015 by Torsten Paul <Torsten.Paul@gmx.de>
//
// To the extent possible under law, the author(s) have dedicated all
// copyright and related and neighboring rights to this software to the
// public domain worldwide. This software is distributed without any
// warranty.
//
// You should have received a copy of the CC0 Public Domain
// Dedication along with this software.
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment