Commit d6c861fa50bd953c2987a106ce29f49f9e5c5e6c
1 parent
a003e49d
Added tapered bullet diagram
Showing
3 changed files
with
527 additions
and
8 deletions
07-tapered_bullet/bullet.png
0 → 100644
70.8 KB
07-tapered_bullet/bullet.svg
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> | ||
3 | + | ||
4 | +<svg | ||
5 | + xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
6 | + xmlns:cc="http://creativecommons.org/ns#" | ||
7 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
8 | + xmlns:svg="http://www.w3.org/2000/svg" | ||
9 | + xmlns="http://www.w3.org/2000/svg" | ||
10 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||
11 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
12 | + width="210mm" | ||
13 | + height="297mm" | ||
14 | + viewBox="0 0 210 297" | ||
15 | + version="1.1" | ||
16 | + id="svg8" | ||
17 | + sodipodi:docname="bullet.svg" | ||
18 | + inkscape:version="0.92.4 (5da689c313, 2019-01-14)" | ||
19 | + inkscape:export-filename="/home/gwj/taper.png" | ||
20 | + inkscape:export-xdpi="644" | ||
21 | + inkscape:export-ydpi="644"> | ||
22 | + <defs | ||
23 | + id="defs2"> | ||
24 | + <marker | ||
25 | + inkscape:stockid="Arrow1Mend" | ||
26 | + orient="auto" | ||
27 | + refY="0.0" | ||
28 | + refX="0.0" | ||
29 | + id="marker13182" | ||
30 | + style="overflow:visible;" | ||
31 | + inkscape:isstock="true"> | ||
32 | + <path | ||
33 | + id="path13180" | ||
34 | + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " | ||
35 | + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1" | ||
36 | + transform="scale(0.4) rotate(180) translate(10,0)" /> | ||
37 | + </marker> | ||
38 | + <marker | ||
39 | + inkscape:isstock="true" | ||
40 | + style="overflow:visible;" | ||
41 | + id="marker11017" | ||
42 | + refX="0.0" | ||
43 | + refY="0.0" | ||
44 | + orient="auto" | ||
45 | + inkscape:stockid="Arrow1Mend" | ||
46 | + inkscape:collect="always"> | ||
47 | + <path | ||
48 | + transform="scale(0.4) rotate(180) translate(10,0)" | ||
49 | + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1" | ||
50 | + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " | ||
51 | + id="path11015" /> | ||
52 | + </marker> | ||
53 | + <marker | ||
54 | + inkscape:stockid="Arrow1Mend" | ||
55 | + orient="auto" | ||
56 | + refY="0.0" | ||
57 | + refX="0.0" | ||
58 | + id="Arrow1Mend" | ||
59 | + style="overflow:visible;" | ||
60 | + inkscape:isstock="true" | ||
61 | + inkscape:collect="always"> | ||
62 | + <path | ||
63 | + id="path836" | ||
64 | + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " | ||
65 | + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1" | ||
66 | + transform="scale(0.4) rotate(180) translate(10,0)" /> | ||
67 | + </marker> | ||
68 | + <marker | ||
69 | + inkscape:stockid="Arrow1Mstart" | ||
70 | + orient="auto" | ||
71 | + refY="0.0" | ||
72 | + refX="0.0" | ||
73 | + id="marker10831" | ||
74 | + style="overflow:visible" | ||
75 | + inkscape:isstock="true"> | ||
76 | + <path | ||
77 | + id="path10829" | ||
78 | + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " | ||
79 | + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1" | ||
80 | + transform="scale(0.4) translate(10,0)" /> | ||
81 | + </marker> | ||
82 | + <marker | ||
83 | + inkscape:isstock="true" | ||
84 | + style="overflow:visible" | ||
85 | + id="marker5567" | ||
86 | + refX="0.0" | ||
87 | + refY="0.0" | ||
88 | + orient="auto" | ||
89 | + inkscape:stockid="Arrow1Mstart" | ||
90 | + inkscape:collect="always"> | ||
91 | + <path | ||
92 | + transform="scale(0.4) translate(10,0)" | ||
93 | + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1" | ||
94 | + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " | ||
95 | + id="path5565" /> | ||
96 | + </marker> | ||
97 | + <marker | ||
98 | + inkscape:stockid="Arrow1Mstart" | ||
99 | + orient="auto" | ||
100 | + refY="0.0" | ||
101 | + refX="0.0" | ||
102 | + id="marker5491" | ||
103 | + style="overflow:visible" | ||
104 | + inkscape:isstock="true" | ||
105 | + inkscape:collect="always"> | ||
106 | + <path | ||
107 | + id="path5489" | ||
108 | + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " | ||
109 | + style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1" | ||
110 | + transform="scale(0.4) translate(10,0)" /> | ||
111 | + </marker> | ||
112 | + <marker | ||
113 | + inkscape:stockid="Arrow1Mstart" | ||
114 | + orient="auto" | ||
115 | + refY="0.0" | ||
116 | + refX="0.0" | ||
117 | + id="Arrow1Mstart" | ||
118 | + style="overflow:visible" | ||
119 | + inkscape:isstock="true"> | ||
120 | + <path | ||
121 | + id="path833" | ||
122 | + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " | ||
123 | + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1" | ||
124 | + transform="scale(0.4) translate(10,0)" /> | ||
125 | + </marker> | ||
126 | + <marker | ||
127 | + inkscape:stockid="Arrow1Lstart" | ||
128 | + orient="auto" | ||
129 | + refY="0.0" | ||
130 | + refX="0.0" | ||
131 | + id="Arrow1Lstart" | ||
132 | + style="overflow:visible" | ||
133 | + inkscape:isstock="true"> | ||
134 | + <path | ||
135 | + id="path827" | ||
136 | + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " | ||
137 | + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1" | ||
138 | + transform="scale(0.8) translate(12.5,0)" /> | ||
139 | + </marker> | ||
140 | + <marker | ||
141 | + inkscape:stockid="Arrow1Lend" | ||
142 | + orient="auto" | ||
143 | + refY="0.0" | ||
144 | + refX="0.0" | ||
145 | + id="Arrow1Lend" | ||
146 | + style="overflow:visible;" | ||
147 | + inkscape:isstock="true"> | ||
148 | + <path | ||
149 | + id="path830" | ||
150 | + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " | ||
151 | + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1" | ||
152 | + transform="scale(0.8) rotate(180) translate(12.5,0)" /> | ||
153 | + </marker> | ||
154 | + <marker | ||
155 | + inkscape:stockid="Arrow1Lstart" | ||
156 | + orient="auto" | ||
157 | + refY="0" | ||
158 | + refX="0" | ||
159 | + id="Arrow1Lstart-7" | ||
160 | + style="overflow:visible" | ||
161 | + inkscape:isstock="true"> | ||
162 | + <path | ||
163 | + inkscape:connector-curvature="0" | ||
164 | + id="path827-0" | ||
165 | + d="M 0,0 5,-5 -12.5,0 5,5 Z" | ||
166 | + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" | ||
167 | + transform="matrix(0.8,0,0,0.8,10,0)" /> | ||
168 | + </marker> | ||
169 | + <marker | ||
170 | + inkscape:stockid="Arrow1Mstart" | ||
171 | + orient="auto" | ||
172 | + refY="0" | ||
173 | + refX="0" | ||
174 | + id="marker5491-1" | ||
175 | + style="overflow:visible" | ||
176 | + inkscape:isstock="true" | ||
177 | + inkscape:collect="always"> | ||
178 | + <path | ||
179 | + inkscape:connector-curvature="0" | ||
180 | + id="path5489-9" | ||
181 | + d="M 0,0 5,-5 -12.5,0 5,5 Z" | ||
182 | + style="fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:#0000ff;stroke-width:1.00000003pt;stroke-opacity:1" | ||
183 | + transform="matrix(0.4,0,0,0.4,4,0)" /> | ||
184 | + </marker> | ||
185 | + <marker | ||
186 | + inkscape:stockid="Arrow1Mstart" | ||
187 | + orient="auto" | ||
188 | + refY="0" | ||
189 | + refX="0" | ||
190 | + id="marker5491-1-7" | ||
191 | + style="overflow:visible" | ||
192 | + inkscape:isstock="true" | ||
193 | + inkscape:collect="always"> | ||
194 | + <path | ||
195 | + inkscape:connector-curvature="0" | ||
196 | + id="path5489-9-8" | ||
197 | + d="M 0,0 5,-5 -12.5,0 5,5 Z" | ||
198 | + style="fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:#0000ff;stroke-width:1.00000003pt;stroke-opacity:1" | ||
199 | + transform="matrix(0.4,0,0,0.4,4,0)" /> | ||
200 | + </marker> | ||
201 | + <marker | ||
202 | + inkscape:stockid="Arrow1Mstart" | ||
203 | + orient="auto" | ||
204 | + refY="0" | ||
205 | + refX="0" | ||
206 | + id="marker5491-5" | ||
207 | + style="overflow:visible" | ||
208 | + inkscape:isstock="true" | ||
209 | + inkscape:collect="always"> | ||
210 | + <path | ||
211 | + inkscape:connector-curvature="0" | ||
212 | + id="path5489-3" | ||
213 | + d="M 0,0 5,-5 -12.5,0 5,5 Z" | ||
214 | + style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.00000003pt;stroke-opacity:1" | ||
215 | + transform="matrix(0.4,0,0,0.4,4,0)" /> | ||
216 | + </marker> | ||
217 | + <marker | ||
218 | + inkscape:stockid="Arrow1Mstart" | ||
219 | + orient="auto" | ||
220 | + refY="0" | ||
221 | + refX="0" | ||
222 | + id="marker5491-1-9" | ||
223 | + style="overflow:visible" | ||
224 | + inkscape:isstock="true" | ||
225 | + inkscape:collect="always"> | ||
226 | + <path | ||
227 | + inkscape:connector-curvature="0" | ||
228 | + id="path5489-9-0" | ||
229 | + d="M 0,0 5,-5 -12.5,0 5,5 Z" | ||
230 | + style="fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:#0000ff;stroke-width:1.00000003pt;stroke-opacity:1" | ||
231 | + transform="matrix(0.4,0,0,0.4,4,0)" /> | ||
232 | + </marker> | ||
233 | + <marker | ||
234 | + inkscape:stockid="Arrow1Mstart" | ||
235 | + orient="auto" | ||
236 | + refY="0" | ||
237 | + refX="0" | ||
238 | + id="marker5491-1-1" | ||
239 | + style="overflow:visible" | ||
240 | + inkscape:isstock="true" | ||
241 | + inkscape:collect="always"> | ||
242 | + <path | ||
243 | + inkscape:connector-curvature="0" | ||
244 | + id="path5489-9-9" | ||
245 | + d="M 0,0 5,-5 -12.5,0 5,5 Z" | ||
246 | + style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.00000003pt;stroke-opacity:1" | ||
247 | + transform="matrix(0.4,0,0,0.4,4,0)" /> | ||
248 | + </marker> | ||
249 | + </defs> | ||
250 | + <sodipodi:namedview | ||
251 | + id="base" | ||
252 | + pagecolor="#ffffff" | ||
253 | + bordercolor="#666666" | ||
254 | + borderopacity="1.0" | ||
255 | + inkscape:pageopacity="1" | ||
256 | + inkscape:pageshadow="2" | ||
257 | + inkscape:zoom="18.472801" | ||
258 | + inkscape:cx="246.9538" | ||
259 | + inkscape:cy="523.67682" | ||
260 | + inkscape:document-units="mm" | ||
261 | + inkscape:current-layer="g12311" | ||
262 | + showgrid="true" | ||
263 | + inkscape:window-width="1920" | ||
264 | + inkscape:window-height="1007" | ||
265 | + inkscape:window-x="0" | ||
266 | + inkscape:window-y="0" | ||
267 | + inkscape:window-maximized="1"> | ||
268 | + <inkscape:grid | ||
269 | + type="xygrid" | ||
270 | + id="grid815" /> | ||
271 | + </sodipodi:namedview> | ||
272 | + <metadata | ||
273 | + id="metadata5"> | ||
274 | + <rdf:RDF> | ||
275 | + <cc:Work | ||
276 | + rdf:about=""> | ||
277 | + <dc:format>image/svg+xml</dc:format> | ||
278 | + <dc:type | ||
279 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||
280 | + <dc:title /> | ||
281 | + </cc:Work> | ||
282 | + </rdf:RDF> | ||
283 | + </metadata> | ||
284 | + <g | ||
285 | + inkscape:label="Layer 1" | ||
286 | + inkscape:groupmode="layer" | ||
287 | + id="layer1"> | ||
288 | + <path | ||
289 | + style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)" | ||
290 | + d="M 41.010417,167.35417 V 142.21875" | ||
291 | + id="path823" | ||
292 | + inkscape:connector-curvature="0" | ||
293 | + inkscape:export-filename="/home/gwj/taper.png" | ||
294 | + inkscape:export-xdpi="644.96997" | ||
295 | + inkscape:export-ydpi="644.96997" /> | ||
296 | + <path | ||
297 | + style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker11017)" | ||
298 | + d="M 41.010417,167.35417 H 74.083334" | ||
299 | + id="path825" | ||
300 | + inkscape:connector-curvature="0" | ||
301 | + inkscape:export-filename="/home/gwj/taper.png" | ||
302 | + inkscape:export-xdpi="644.96997" | ||
303 | + inkscape:export-ydpi="644.96997" /> | ||
304 | + <g | ||
305 | + id="g12311" | ||
306 | + transform="rotate(30,62.177082,154.125)" | ||
307 | + style="" | ||
308 | + inkscape:export-filename="/home/gwj/taper.png" | ||
309 | + inkscape:export-xdpi="644.96997" | ||
310 | + inkscape:export-ydpi="644.96997"> | ||
311 | + <path | ||
312 | + sodipodi:nodetypes="cc" | ||
313 | + inkscape:connector-curvature="0" | ||
314 | + id="path817" | ||
315 | + d="M 54.239583,160.73958 V 147.51042" | ||
316 | + style="fill:none;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker13182)" /> | ||
317 | + <path | ||
318 | + inkscape:connector-curvature="0" | ||
319 | + id="path819" | ||
320 | + d="M 76.729166,156.77083 H 75.876328 63.5" | ||
321 | + style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker5567)" | ||
322 | + sodipodi:nodetypes="ccc" /> | ||
323 | + <path | ||
324 | + sodipodi:nodetypes="cc" | ||
325 | + inkscape:connector-curvature="0" | ||
326 | + id="path819-8" | ||
327 | + d="M 70.114583,152.80208 H 63.5" | ||
328 | + style="fill:none;stroke:#ff0000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker5491)" /> | ||
329 | + <path | ||
330 | + sodipodi:nodetypes="cc" | ||
331 | + inkscape:connector-curvature="0" | ||
332 | + id="path819-8-9" | ||
333 | + d="M 67.46875,148.83333 H 63.5" | ||
334 | + style="fill:none;stroke:#0000ff;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker5491-1)" /> | ||
335 | + <path | ||
336 | + sodipodi:nodetypes="cc" | ||
337 | + inkscape:connector-curvature="0" | ||
338 | + id="path819-8-9-2" | ||
339 | + d="m 58.208333,147.51042 h -3.96875" | ||
340 | + style="fill:none;stroke:#0000ff;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker5491-1-7)" /> | ||
341 | + <path | ||
342 | + sodipodi:nodetypes="cc" | ||
343 | + inkscape:connector-curvature="0" | ||
344 | + id="path819-8-4" | ||
345 | + d="M 60.854167,160.73958 H 54.239584" | ||
346 | + style="fill:none;stroke:#ff0000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker5491-5)" /> | ||
347 | + <path | ||
348 | + sodipodi:nodetypes="cc" | ||
349 | + inkscape:connector-curvature="0" | ||
350 | + id="path819-8-9-20" | ||
351 | + d="m 50.270833,147.51042 h 3.96875" | ||
352 | + style="fill:none;stroke:#0000ff;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker5491-1-9)" /> | ||
353 | + <path | ||
354 | + sodipodi:nodetypes="cc" | ||
355 | + inkscape:connector-curvature="0" | ||
356 | + id="path819-8-9-6" | ||
357 | + d="m 47.624999,160.73958 h 6.614584" | ||
358 | + style="fill:none;stroke:#ff0000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker5491-1-1)" /> | ||
359 | + </g> | ||
360 | + <text | ||
361 | + xml:space="preserve" | ||
362 | + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:1.23472226px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" | ||
363 | + x="48.826588" | ||
364 | + y="157.38641" | ||
365 | + id="text12334" | ||
366 | + inkscape:export-filename="/home/gwj/taper.png" | ||
367 | + inkscape:export-xdpi="644.96997" | ||
368 | + inkscape:export-ydpi="644.96997"><tspan | ||
369 | + sodipodi:role="line" | ||
370 | + id="tspan12332" | ||
371 | + x="48.826588" | ||
372 | + y="157.38641" | ||
373 | + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:1.23472226px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332">(x1,y1)</tspan></text> | ||
374 | + <text | ||
375 | + xml:space="preserve" | ||
376 | + style="font-style:normal;font-weight:normal;font-size:1.23472222px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;-inkscape-font-specification:'sans-serif, Normal';font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;" | ||
377 | + x="58.786926" | ||
378 | + y="143.84509" | ||
379 | + id="text12334-5" | ||
380 | + inkscape:export-filename="/home/gwj/taper.png" | ||
381 | + inkscape:export-xdpi="644.96997" | ||
382 | + inkscape:export-ydpi="644.96997"><tspan | ||
383 | + sodipodi:role="line" | ||
384 | + id="tspan12332-7" | ||
385 | + x="58.786926" | ||
386 | + y="143.84509" | ||
387 | + style="font-size:1.23472222px;stroke-width:0.26458332;-inkscape-font-specification:'sans-serif, Normal';font-family:sans-serif;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;">(x2,y2)</tspan></text> | ||
388 | + <text | ||
389 | + xml:space="preserve" | ||
390 | + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:1.23472226px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" | ||
391 | + x="68.670227" | ||
392 | + y="160.12772" | ||
393 | + id="text12334-6" | ||
394 | + inkscape:export-filename="/home/gwj/taper.png" | ||
395 | + inkscape:export-xdpi="644.96997" | ||
396 | + inkscape:export-ydpi="644.96997"><tspan | ||
397 | + sodipodi:role="line" | ||
398 | + x="68.670227" | ||
399 | + y="160.12772" | ||
400 | + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:1.23472226px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332" | ||
401 | + id="tspan12362">(dx_p,dy_p)</tspan></text> | ||
402 | + <text | ||
403 | + xml:space="preserve" | ||
404 | + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:1.23472226px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" | ||
405 | + x="66.845749" | ||
406 | + y="154.74429" | ||
407 | + id="text12334-1" | ||
408 | + inkscape:export-filename="/home/gwj/taper.png" | ||
409 | + inkscape:export-xdpi="644.96997" | ||
410 | + inkscape:export-ydpi="644.96997"><tspan | ||
411 | + sodipodi:role="line" | ||
412 | + id="tspan12332-2" | ||
413 | + x="66.845749" | ||
414 | + y="154.74429" | ||
415 | + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:1.23472226px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332">(dx_p_s,dy_p_s)</tspan></text> | ||
416 | + <text | ||
417 | + xml:space="preserve" | ||
418 | + style="font-style:normal;font-weight:normal;font-size:1.23472222px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;-inkscape-font-specification:'sans-serif, Normal';font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;" | ||
419 | + x="68.20369" | ||
420 | + y="150.40446" | ||
421 | + id="text12334-7" | ||
422 | + inkscape:export-filename="/home/gwj/taper.png" | ||
423 | + inkscape:export-xdpi="644.96997" | ||
424 | + inkscape:export-ydpi="644.96997"><tspan | ||
425 | + sodipodi:role="line" | ||
426 | + id="tspan12332-0" | ||
427 | + x="68.20369" | ||
428 | + y="150.40446" | ||
429 | + style="stroke-width:0.26458332;font-size:1.23472222px;-inkscape-font-specification:'sans-serif, Normal';font-family:sans-serif;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;">(dx_p_s_t,dy_p_s_t)</tspan></text> | ||
430 | + <text | ||
431 | + xml:space="preserve" | ||
432 | + style="font-style:normal;font-weight:normal;font-size:1.23472222px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;-inkscape-font-specification:'sans-serif, Normal';font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;" | ||
433 | + x="51.850914" | ||
434 | + y="141.56651" | ||
435 | + id="text12334-3" | ||
436 | + inkscape:export-filename="/home/gwj/taper.png" | ||
437 | + inkscape:export-xdpi="644.96997" | ||
438 | + inkscape:export-ydpi="644.96997"><tspan | ||
439 | + sodipodi:role="line" | ||
440 | + id="tspan12332-4" | ||
441 | + x="51.850914" | ||
442 | + y="141.56651" | ||
443 | + style="font-size:1.23472222px;stroke-width:0.26458332;-inkscape-font-specification:'sans-serif, Normal';font-family:sans-serif;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;">(x1_c,y1_c)</tspan></text> | ||
444 | + <text | ||
445 | + xml:space="preserve" | ||
446 | + style="font-style:normal;font-weight:normal;font-size:1.23472222px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;-inkscape-font-specification:'sans-serif, Normal';font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;" | ||
447 | + x="59.944656" | ||
448 | + y="147.82278" | ||
449 | + id="text12334-53" | ||
450 | + inkscape:export-filename="/home/gwj/taper.png" | ||
451 | + inkscape:export-xdpi="644.96997" | ||
452 | + inkscape:export-ydpi="644.96997"><tspan | ||
453 | + sodipodi:role="line" | ||
454 | + id="tspan12332-76" | ||
455 | + x="59.944656" | ||
456 | + y="147.82278" | ||
457 | + style="font-size:1.23472222px;stroke-width:0.26458332;-inkscape-font-specification:'sans-serif, Normal';font-family:sans-serif;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;">(x2_c,y2_c)</tspan></text> | ||
458 | + <text | ||
459 | + xml:space="preserve" | ||
460 | + style="font-style:normal;font-weight:normal;font-size:1.23472222px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;-inkscape-font-specification:'sans-serif, Normal';font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;" | ||
461 | + x="43.224407" | ||
462 | + y="151.82832" | ||
463 | + id="text12334-0" | ||
464 | + inkscape:export-filename="/home/gwj/taper.png" | ||
465 | + inkscape:export-xdpi="644.96997" | ||
466 | + inkscape:export-ydpi="644.96997"><tspan | ||
467 | + sodipodi:role="line" | ||
468 | + id="tspan12332-06" | ||
469 | + x="43.224407" | ||
470 | + y="151.82832" | ||
471 | + style="font-size:1.23472222px;stroke-width:0.26458332;-inkscape-font-specification:'sans-serif, Normal';font-family:sans-serif;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;">(x3_c,y3_c)</tspan></text> | ||
472 | + <text | ||
473 | + xml:space="preserve" | ||
474 | + style="font-style:normal;font-weight:normal;font-size:1.23472222px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;-inkscape-font-specification:'sans-serif, Normal';font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;" | ||
475 | + x="55.626766" | ||
476 | + y="160.44565" | ||
477 | + id="text12334-31" | ||
478 | + inkscape:export-filename="/home/gwj/taper.png" | ||
479 | + inkscape:export-xdpi="644.96997" | ||
480 | + inkscape:export-ydpi="644.96997"><tspan | ||
481 | + sodipodi:role="line" | ||
482 | + id="tspan12332-00" | ||
483 | + x="55.626766" | ||
484 | + y="160.44565" | ||
485 | + style="font-size:1.23472222px;stroke-width:0.26458332;-inkscape-font-specification:'sans-serif, Normal';font-family:sans-serif;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;">(x4_c,y4_c)</tspan></text> | ||
486 | + <text | ||
487 | + xml:space="preserve" | ||
488 | + style="font-style:normal;font-weight:normal;font-size:1.23472222px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;-inkscape-font-specification:'sans-serif, Normal';font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;" | ||
489 | + x="74.147598" | ||
490 | + y="169.07216" | ||
491 | + id="text12334-2" | ||
492 | + inkscape:export-filename="/home/gwj/taper.png" | ||
493 | + inkscape:export-xdpi="644.96997" | ||
494 | + inkscape:export-ydpi="644.96997"><tspan | ||
495 | + sodipodi:role="line" | ||
496 | + id="tspan12332-74" | ||
497 | + x="74.147598" | ||
498 | + y="169.07216" | ||
499 | + style="font-size:1.23472222px;stroke-width:0.26458332;-inkscape-font-specification:'sans-serif, Normal';font-family:sans-serif;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;">x</tspan></text> | ||
500 | + <text | ||
501 | + xml:space="preserve" | ||
502 | + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:1.23472222px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;" | ||
503 | + x="39.935497" | ||
504 | + y="141.61244" | ||
505 | + id="text12334-2-1" | ||
506 | + inkscape:export-filename="/home/gwj/taper.png" | ||
507 | + inkscape:export-xdpi="644.96997" | ||
508 | + inkscape:export-ydpi="644.96997"><tspan | ||
509 | + sodipodi:role="line" | ||
510 | + id="tspan13160" | ||
511 | + x="39.935497" | ||
512 | + y="141.61244">y</tspan></text> | ||
513 | + </g> | ||
514 | +</svg> |
07-tapered_bullet/cannon.c
@@ -72,27 +72,32 @@ void draw_bullet(int x1, int y1, int x2, int y2, int width, double taper, int co | @@ -72,27 +72,32 @@ void draw_bullet(int x1, int y1, int x2, int y2, int width, double taper, int co | ||
72 | int dy = y2 - y1; | 72 | int dy = y2 - y1; |
73 | 73 | ||
74 | // define vector perpendicular to the central line | 74 | // define vector perpendicular to the central line |
75 | - int dy_p = dx; | ||
76 | int dx_p = dy; | 75 | int dx_p = dy; |
76 | + int dy_p = -dx; | ||
77 | double len = hypot(dx_p, dy_p); | 77 | double len = hypot(dx_p, dy_p); |
78 | 78 | ||
79 | // scale its length to proper width | 79 | // scale its length to proper width |
80 | - int dy_p_s = width / (2.0 * len) * dy_p; | ||
81 | int dx_p_s = width / (2.0 * len) * dx_p; | 80 | int dx_p_s = width / (2.0 * len) * dx_p; |
81 | + int dy_p_s = width / (2.0 * len) * dy_p; | ||
82 | + | ||
83 | + | ||
84 | + // scale the vector by taper | ||
85 | + int dx_p_s_t = dx_p_s * taper; | ||
86 | + int dy_p_s_t = dy_p_s * taper; | ||
82 | 87 | ||
83 | // compute corners | 88 | // compute corners |
84 | 89 | ||
85 | - int x1c = x2 - dx_p_s * taper; | ||
86 | - int y1c = y2 + dy_p_s * taper; | 90 | + int x1c = x2 - dx_p_s_t; |
91 | + int y1c = y2 - dy_p_s_t; | ||
87 | 92 | ||
88 | - int x2c = x2 + dx_p_s * taper; | ||
89 | - int y2c = y2 - dy_p_s * taper; | 93 | + int x2c = x2 + dx_p_s_t; |
94 | + int y2c = y2 + dy_p_s_t; | ||
90 | 95 | ||
91 | int x3c = x1 - dx_p_s; | 96 | int x3c = x1 - dx_p_s; |
92 | - int y3c = y1 + dy_p_s; | 97 | + int y3c = y1 - dy_p_s; |
93 | 98 | ||
94 | int x4c = x1 + dx_p_s; | 99 | int x4c = x1 + dx_p_s; |
95 | - int y4c = y1 - dy_p_s; | 100 | + int y4c = y1 + dy_p_s; |
96 | 101 | ||
97 | gfx_filledTriangle(x1c, y1c, x2c, y2c, x3c, y3c, color); | 102 | gfx_filledTriangle(x1c, y1c, x2c, y2c, x3c, y3c, color); |
98 | gfx_filledTriangle(x4c, y4c, x2c, y2c, x3c, y3c, color); | 103 | gfx_filledTriangle(x4c, y4c, x2c, y2c, x3c, y3c, color); |