head	1.84;
access;
symbols;
locks
	www-data:1.84; strict;
comment	@# @;


1.84
date	2005.05.16.06.39.39;	author www-data;	state Exp;
branches;
next	1.83;

1.83
date	2005.05.16.06.37.09;	author www-data;	state Exp;
branches;
next	1.82;

1.82
date	2005.05.16.06.35.14;	author www-data;	state Exp;
branches;
next	1.81;

1.81
date	2005.05.16.04.24.14;	author www-data;	state Exp;
branches;
next	1.80;

1.80
date	2005.05.16.04.21.51;	author www-data;	state Exp;
branches;
next	1.79;

1.79
date	2005.05.16.04.05.38;	author www-data;	state Exp;
branches;
next	1.78;

1.78
date	2005.05.13.19.29.30;	author www-data;	state Exp;
branches;
next	1.77;

1.77
date	2005.05.13.19.26.57;	author www-data;	state Exp;
branches;
next	1.76;

1.76
date	2005.05.13.19.21.48;	author www-data;	state Exp;
branches;
next	1.75;

1.75
date	2005.05.13.19.18.08;	author www-data;	state Exp;
branches;
next	1.74;

1.74
date	2005.05.13.19.17.19;	author www-data;	state Exp;
branches;
next	1.73;

1.73
date	2005.05.13.19.11.27;	author www-data;	state Exp;
branches;
next	1.72;

1.72
date	2005.05.13.19.07.53;	author www-data;	state Exp;
branches;
next	1.71;

1.71
date	2005.05.13.19.04.43;	author www-data;	state Exp;
branches;
next	1.70;

1.70
date	2005.05.13.19.00.49;	author www-data;	state Exp;
branches;
next	1.69;

1.69
date	2005.05.13.18.51.35;	author www-data;	state Exp;
branches;
next	1.68;

1.68
date	2005.05.13.18.48.04;	author www-data;	state Exp;
branches;
next	1.67;

1.67
date	2005.05.13.18.46.30;	author www-data;	state Exp;
branches;
next	1.66;

1.66
date	2005.05.13.18.45.52;	author www-data;	state Exp;
branches;
next	1.65;

1.65
date	2005.05.13.18.39.46;	author www-data;	state Exp;
branches;
next	1.64;

1.64
date	2005.05.13.18.39.14;	author www-data;	state Exp;
branches;
next	1.63;

1.63
date	2005.05.13.18.36.38;	author www-data;	state Exp;
branches;
next	1.62;

1.62
date	2005.05.13.18.26.49;	author www-data;	state Exp;
branches;
next	1.61;

1.61
date	2005.05.13.17.37.37;	author www-data;	state Exp;
branches;
next	1.60;

1.60
date	2005.05.13.17.36.25;	author www-data;	state Exp;
branches;
next	1.59;

1.59
date	2005.05.13.17.34.15;	author www-data;	state Exp;
branches;
next	1.58;

1.58
date	2005.05.13.17.33.43;	author www-data;	state Exp;
branches;
next	1.57;

1.57
date	2005.05.13.17.33.20;	author www-data;	state Exp;
branches;
next	1.56;

1.56
date	2005.05.13.17.31.00;	author www-data;	state Exp;
branches;
next	1.55;

1.55
date	2005.05.13.17.29.50;	author www-data;	state Exp;
branches;
next	1.54;

1.54
date	2005.05.13.17.26.41;	author www-data;	state Exp;
branches;
next	1.53;

1.53
date	2005.05.13.17.25.49;	author www-data;	state Exp;
branches;
next	1.52;

1.52
date	2005.05.13.17.25.09;	author www-data;	state Exp;
branches;
next	1.51;

1.51
date	2005.05.13.17.24.39;	author www-data;	state Exp;
branches;
next	1.50;

1.50
date	2005.05.13.17.24.08;	author www-data;	state Exp;
branches;
next	1.49;

1.49
date	2005.05.13.17.22.39;	author www-data;	state Exp;
branches;
next	1.48;

1.48
date	2005.05.13.17.22.18;	author www-data;	state Exp;
branches;
next	1.47;

1.47
date	2005.05.13.17.21.38;	author www-data;	state Exp;
branches;
next	1.46;

1.46
date	2005.05.13.17.20.42;	author www-data;	state Exp;
branches;
next	1.45;

1.45
date	2005.05.13.17.19.23;	author www-data;	state Exp;
branches;
next	1.44;

1.44
date	2005.05.13.17.18.59;	author www-data;	state Exp;
branches;
next	1.43;

1.43
date	2005.05.13.17.16.13;	author www-data;	state Exp;
branches;
next	1.42;

1.42
date	2005.05.13.17.14.44;	author www-data;	state Exp;
branches;
next	1.41;

1.41
date	2005.05.13.17.13.14;	author www-data;	state Exp;
branches;
next	1.40;

1.40
date	2005.05.13.07.01.30;	author www-data;	state Exp;
branches;
next	1.39;

1.39
date	2005.05.13.04.47.05;	author www-data;	state Exp;
branches;
next	1.38;

1.38
date	2005.05.13.04.44.49;	author www-data;	state Exp;
branches;
next	1.37;

1.37
date	2005.05.13.04.29.15;	author www-data;	state Exp;
branches;
next	1.36;

1.36
date	2005.05.13.04.27.50;	author www-data;	state Exp;
branches;
next	1.35;

1.35
date	2005.05.13.04.26.53;	author www-data;	state Exp;
branches;
next	1.34;

1.34
date	2005.05.13.04.14.29;	author www-data;	state Exp;
branches;
next	1.33;

1.33
date	2005.05.13.04.08.47;	author www-data;	state Exp;
branches;
next	1.32;

1.32
date	2005.05.13.04.06.47;	author www-data;	state Exp;
branches;
next	1.31;

1.31
date	2005.05.13.03.58.03;	author www-data;	state Exp;
branches;
next	1.30;

1.30
date	2005.05.13.03.57.37;	author www-data;	state Exp;
branches;
next	1.29;

1.29
date	2005.05.13.03.51.09;	author www-data;	state Exp;
branches;
next	1.28;

1.28
date	2005.05.13.03.50.51;	author www-data;	state Exp;
branches;
next	1.27;

1.27
date	2005.05.13.03.50.29;	author www-data;	state Exp;
branches;
next	1.26;

1.26
date	2005.05.13.03.46.24;	author www-data;	state Exp;
branches;
next	1.25;

1.25
date	2005.05.13.03.45.44;	author www-data;	state Exp;
branches;
next	1.24;

1.24
date	2005.05.13.03.45.02;	author www-data;	state Exp;
branches;
next	1.23;

1.23
date	2005.05.09.18.32.06;	author www-data;	state Exp;
branches;
next	1.22;

1.22
date	2005.05.09.16.40.18;	author www-data;	state Exp;
branches;
next	1.21;

1.21
date	2005.05.09.16.39.27;	author www-data;	state Exp;
branches;
next	1.20;

1.20
date	2005.05.09.16.38.30;	author www-data;	state Exp;
branches;
next	1.19;

1.19
date	2005.05.09.16.35.25;	author www-data;	state Exp;
branches;
next	1.18;

1.18
date	2005.05.09.16.34.49;	author www-data;	state Exp;
branches;
next	1.17;

1.17
date	2005.05.02.16.48.07;	author www-data;	state Exp;
branches;
next	1.16;

1.16
date	2005.05.02.16.31.13;	author www-data;	state Exp;
branches;
next	1.15;

1.15
date	2005.05.02.16.28.03;	author www-data;	state Exp;
branches;
next	1.14;

1.14
date	2005.05.02.16.27.09;	author www-data;	state Exp;
branches;
next	1.13;

1.13
date	2005.04.25.17.33.08;	author www-data;	state Exp;
branches;
next	1.12;

1.12
date	2005.04.25.17.31.17;	author www-data;	state Exp;
branches;
next	1.11;

1.11
date	2005.04.25.17.10.22;	author www-data;	state Exp;
branches;
next	1.10;

1.10
date	2005.04.25.17.09.48;	author www-data;	state Exp;
branches;
next	1.9;

1.9
date	2005.04.25.17.09.18;	author www-data;	state Exp;
branches;
next	1.8;

1.8
date	2005.04.25.17.04.41;	author www-data;	state Exp;
branches;
next	1.7;

1.7
date	2005.04.06.19.23.13;	author www-data;	state Exp;
branches;
next	1.6;

1.6
date	2005.04.04.18.12.47;	author www-data;	state Exp;
branches;
next	1.5;

1.5
date	2005.04.04.18.12.33;	author www-data;	state Exp;
branches;
next	1.4;

1.4
date	2005.04.04.18.12.02;	author www-data;	state Exp;
branches;
next	1.3;

1.3
date	2005.04.04.18.11.39;	author www-data;	state Exp;
branches;
next	1.2;

1.2
date	2005.04.04.18.10.44;	author www-data;	state Exp;
branches;
next	1.1;

1.1
date	2005.04.04.18.10.20;	author www-data;	state Exp;
branches;
next	;


desc
@site.py
@


1.84
log
@site.py
@
text
@<html>
<head>
<title>Amy Sun's NMM Final Project</title>
<link rel="stylesheet" href="nmm.css">
</head>

<body>
<!--#include virtual=header.html -->

<div class="main">
Amy's Final Project
<p>
<font size=+2>Optimized Toolpath Generation</font>
<p>
After many daytrips down adjacent paths, this project finds a toolpath given a 2D shape described as vertices of a polyline.
<p>
At the heart of the project, I convert an ".svg" (Scalar Vector Graphics) polyshape to a set of inequalities.  Chained together, they are used for tool collision detection.  
<hr>
[ <a href=problem.html>The problem</a> | <a href=code.html>code requirements</a> | <a href=output.html> output</a> ]

<!--#include virtual=footer.html -->

</body>

<br>
<A href=edit_index.html title="site_edit_link"><font size=1>edit</font></A>
@


1.83
log
@site.py
@
text
@d8 1
a8 8

<div class="headbar">
<table width=100% border=0 cellspacing=5><tr>
<td valign=bottom align=left width=33% align=left><font color=#FFFFFF face="arial, helvetica, san-serif" size=-1>Amy Sun</font>
  <td valign=bottom align=left width=33% align=center><font color=#FFFFFF face="arial, helvetica, san-serif" size=-1>Massachusetts Institute of Technology</font>
  <td valign=bottom width=33% align=right><font color=#FFFFFF face="arial, helvetica, san-serif" size=-1>amys at mit dot edu</font>
</table>
</div>
d21 1
a21 3
<hr><address><a href=http://web.media.mit.edu/~asun/>Amy Sun [amys at mit dot edu]</a> Feb 2005</address>
</div>
<img class=tight src=http://web.mit.edu/graphicidentity/interface/mit-redgrey-footer1.gif>
@


1.82
log
@site.py
@
text
@a27 2

<hr>
@


1.81
log
@site.py
@
text
@d26 1
a26 97
<p class=title>parsing .svg</p>
Here is an svg description of a 1" by 1" square.<br>
<table cellpadding=10 >
<tr><td><img class=tight src=square.jpg><br><a href="square.svg">square.svg</a>
<td><pre> 
&lt;?xml version="1.0" encoding="UTF-8"?>
&lt;!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
&lt;svg width="26mm" height="26mm" viewBox="0 0 2600 2600">
 &lt;g style="stroke:rgb(0,0,0);fill:none">
  &lt;polyline points="1270,2540 0,2540 0,0 2540,0 2540,2540 1270,2540" style="fill:none"/>
 &lt;/g>
&lt;/svg>
</pre>
</table>
<p>
Right off the bat, I notice a few things in the polyline string.  First, it's in centimeters.  Second, and more importantly, there are 6 points defined instead of 5 as I expect.  (I expect 5 because there are 4 vertices but the starting and ending point need to be specified explicitly to close the shape.)  
<p>
I used Open Office Draw to make the square, using the square primative.  I want to start simpler, so I use the polygon tool to specify 4 vertices to make a 1" square:
<br>
<table cellpadding=10>
<tr><td><img class=tight src=poly-square.jpg><br><a href="poly-square.svg">poly-square.svg</a>
<td><pre> 
&lt;?xml version="1.0" encoding="UTF-8"?>
&lt;!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
&lt;svg width="26mm" height="26mm" viewBox="0 0 2600 2600">
 &lt;g style="stroke:rgb(0,0,0);fill:none">
  &lt;polyline points="0,2540 0,0 2540,0 2540,2540 0,2540" style="fill:none"/>
 &lt;/g>
&lt;/svg>
</pre>
</table>
<p>
Yeay!  I started my drawing in the lower left hand corner and if I consider (0,0) as the upper right hand corner, the points are consistent with the order I drew them in which was clockwise from the lower left.  The problem with this is that it doesn't conveniently drop into the usual coordinate system where numbers get bigger up and to the right.
<p>
Since it's entirely up to me, I'll chose to transform the points to fit the more usual coordinate system.  "viewBox" conveniently tells me the min and max values for x and y so I can use this to offset the y.
<p>
Ok, so I need to write some code that
<br>
<div class="accent">
1) picks out the viewBox coords as the min and max x and y coords
<br>2) picks out the polyline points
<br>3) offsets the y coords of the polyline points so that (0,0) is in the lower left; without flipping the shape
</div>
<p>
<p class=title>line segments</p>
Expressing the points as line segments is simply finding the line defined by two points, (x1, y1) and (x2, y2).
<ul>
y = m &times; x + b     such that x1 &le; x &le; x2, y1 &le; y &le; y2
<p>
m = slope = (y2 - y1) / (x2 - x1)
<p>
b = offset = y1 - m &times; x1  (or use x2, y2)
</ul>
Written in standard form, A &times; x + B &times; y = C, 
the inequality with C represents the side of the line that is inside the shape.
<p>
So the code also needs to:
<div class=accent>4) calculate m and b for each pair of points, then express the equation in standard form A &times; x + B &times; y = C
</div>
<p class=title>inequalities</p>
I also need the code to <div class=accent>5b) determine if the shape is on the "greater than" or "less than" side of the segment (ie, A  x + B  y &le; C, or A  x + B  y &ge; C)
</div>
Graphics convention is that the vector normal points to the interior of the object.  Given two points (x1, y1) and (x2, y2) in that order,
<ul>
if the slope is increasing (positive), the normal vector on the "right" side is (x2, y1)
<p>
if the slope is decreasing (negative), the normal vector on the "right" side is (x1, y2)
</ul>
<p>
I assume that the points are given in the appropriate order.  However, the polyline points are recorded in the order that I drew them in.  Look:
<br>
<table cellpadding=10>
<tr><td><img class=tight src=counterclock.jpg><br><a href="counterclock.svg">counterclock.svg</a>
<td><pre> 
&lt;?xml version="1.0" encoding="UTF-8"?>
&lt;!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
&lt;svg width="26mm" height="26mm" viewBox="0 0 2600 2600">
 &lt;g style="stroke:rgb(0,0,0);fill:none">
  &lt;polyline points="2540,0 0,0 0,2540 2540,2540 2540,0" style="fill:none"/>
 &lt;/g>
&lt;/svg>
</pre>
</table>
<p>
So in order to figure out which side is "in", I'll also need to make sure I am travelling the vertices in the clockwise direction.
<p> <div class=accent>5a) reorganize points so they are travelled in the clockwise direction</div><p>

Finally, the code should output the inequalities as a list.  Later, the inequalities are strung together into clauses.  The union of all these segments is a big mess while the intersection isn't right either - consider the case of this shape where the intersection of the lines results in the very small shape just under the green and yellow lines.
<p>
<img height=150 class=tight src=pent-two-min.jpg>
<img height=150 class=tight src=intersection.jpg>
<br><a href=pent-two-min.svg>pent-two-min.svg</a>
<p>
Well, that's interesting.  For the moment, though, I'll punt on what to do with all the inequalities and focus on generating the list of inequalities.

<hr>
Move on to <a href=code.html>code requirements</a>.
@


1.80
log
@site.py
@
text
@a119 10
<p class=title>code requirements</p>
Recapping the code requirements:
<div class="accent">
1) pick out the viewBox coords as the min and max x and y coords
<br>2) pick out the polyline points
<br>3) offset the y coords of the polyline points so that (0,0) is in the lower left; without flipping the shape
<br>4) calculate m and b for each pair of points, then express the equation in standard form A x + B y = C
<br>5) reorganize points so they are travelled in the clockwise direction
<br>6) determine if the shape is on the "greater than" or "less than" side of the segment (ie, A  x + B  y &le; C, or A  x + B  y &ge; C)
<br>7) output a list of inequalities in the form of Ax + By &le; C (or &ge; as appropriate)
d121 2
a122 3
</div>
<p>
Ideally, these operations should be written as python functions so that it may be called by <i>cam.py</i> and further used for tool collision detection.
@


1.79
log
@site.py
@
text
@d88 1
a88 1
There is a graphics convention that the segment normal points to the interior of the object.  Easy, given the two points (x1, y1) and (x2, y2) in that order,
d95 1
a95 1
I assume that the points are given in the appropriate order, meaning that if the points are travelling clockwise, However, the polyline points are recorded in the order that I drew them in.  Look:
d113 1
a113 1
Finally, the code should output the inequalities as a list.  But wait... the union of all these segments is a big mess.  The intersection isn't right either.  Consider the case of this shape where the intersection of the lines results in the very small shape just under the green and yellow lines.
@


1.78
log
@site.py
@
text
@d3 1
d5 1
a6 3
<meta http-equiv="refresh" content="90">

</head>
a13 1

a17 2

<p>
d20 1
a20 1
Optimized Toolpath Generation
d79 2
d83 1
a83 1
<div class=accent>4) calculate m and b for each pair of points
d86 1
a86 1
I also need the code to <div class=accent>5) record if the shape is on the "greater than" or "less than" side of the segment
d88 8
a95 1
Hmm, figuring out which side of the line segment is "in" isn't that easy.  There is a graphics convention that the segment normal points to the interior of the object.  However, the polyline points are recorded in the order that I drew them in.  Look:
d111 1
a111 2
<div class=accent>6) reorganize points so they are travelled in the clockwise direction</div>
I'll ignore that for the moment and get on to the next thing I'm not so sure about, making the inequality statement.  In the case of the square, by inspection
d113 17
d131 6
a136 3
<img src=pent.jpg>
<img src=pent-two-min.jpg>
<img src=pent-side-notch.jpg>
@


1.77
log
@site.py
@
text
@d72 1
a72 1
</accent>
d85 2
a86 2
<p class=accent><ul>4) calculate m and b for each pair of points
</ul></p>
d88 2
a89 2
I also need the code to <p class=accent><ul>5) record if the shape is on the "greater than" or "less than" side of the segment
</ul></p>
d106 1
a106 1
<p class=accent><ul>6) reorganize points so they are travelled in the clockwise direction</ul></p>
@


1.76
log
@site.py
@
text
@d68 1
a68 1
<accent>
@


1.75
log
@site.py
@
text
@d68 1
a68 1
<ul><p class=accent>
d72 1
a72 1
</ul></p>
@


1.74
log
@site.py
@
text
@d67 2
a68 2
<br><p class=accent>
<ul>
@


1.73
log
@site.py
@
text
@d67 1
a67 1
<br>
d72 1
a72 2

</ul>
d85 2
a86 2
<ul>4) calculate m and b for each pair of points
</ul>
d88 2
a89 2
I also need the code to <ul>5) record if the shape is on the "greater than" or "less than" side of the segment
</ul>
d106 1
a106 1
<ul>6) reorganize points so they are travelled in the clockwise direction</ul>
@


1.72
log
@site.py
@
text
@d72 1
a72 1
<br>4) records if the shape is on the "greater than" or "less than" side of the segment
d86 1
a86 1
<ul>5) calculate m and b for each pair of points
d89 3
a91 1
Hmm, figuring out which side of the line segment is "in" isn't that easy.  The polyline points are recorded in the order that I drew them in.  Look:
d106 2
a107 1

@


1.71
log
@site.py
@
text
@d82 1
a82 1
b = y1 - m &times; x1  (or use x2, y2)
@


1.70
log
@site.py
@
text
@d78 1
a78 1
y = m * x + b     such that x1 &le; x &le; x2, y1 &le; y &le; y2
d82 1
a82 1
b = y1 - m * x1  (or use x2, y2)
@


1.69
log
@site.py
@
text
@d78 1
a78 1
y = m * x + b     such that x1 <= x <= x2, y1 <= y <= y2
@


1.68
log
@site.py
@
text
@d84 4
@


1.67
log
@site.py
@
text
@d78 1
a78 1
y = m * x + b
@


1.66
log
@site.py
@
text
@d77 1
a77 1
<ul><code>
a78 1
</code>
@


1.65
log
@site.py
@
text
@d75 12
a86 2
<p class=title>Inequalities</p>
Hmm, that last point isn't easy.  The polyline points are recorded in the order that I drew them in.  Look:
@


1.64
log
@site.py
@
text
@d75 1
d91 1
a91 1
<p class=title>Inequalities</p>
@


1.63
log
@site.py
@
text
@d5 1
a5 1
<meta http-equiv="refresh" content="15">
@


1.62
log
@site.py
@
text
@d30 1
@


1.61
log
@site.py
@
text
@d89 2
a90 1
I'll ignore that for the moment and get on to the next thing I'm not so sure about, making the inequality statement.  In the case of the square,
@


1.60
log
@site.py
@
text
@d50 1
a50 1
<td><code> 
d58 1
a58 1
</code>
@


1.59
log
@site.py
@
text
@d50 1
a50 1
<td><pre> 
d58 1
a58 1
</pre>
@


1.58
log
@site.py
@
text
@d19 1
@


1.57
log
@site.py
@
text
@d3 1
a3 1
<link rel="stylesheet" href="http://web.media.mit.edu/~asun/nmm.css">
@


1.56
log
@site.py
@
text
@d3 1
a3 1
<link rel="stylesheet" href="http://web.media.mit.edu/~asun/amy.css">
@


1.55
log
@site.py
@
text
@a19 2
<div class="main">

@


1.54
log
@site.py
@
text
@a19 13
<div class="nav">
<li><a href="http://web.media.mit.edu/~asun/">Amy Home</a>
<li><a href="http://fab.cba.mit.edu">1</a>
<li><a href="http://www.boilerbots.com">2</a>

<li class=general><a href="http://www.cba.mit.edu">Other NMM People</a>
<li class=general><a href="http://www.cba.mit.edu">The Center for Bits and Atoms</a>
<li class=general><a href="http://www.media.mit.edu">The Media Lab</a>
<li class=general><a href="http://www.mit.edu/">MIT</a>
</div>



@


1.53
log
@site.py
@
text
@d62 2
a63 2
<table cellspacing=10 cellpadding=10>
<tr><td><img src=poly-square.jpg><br><a href="poly-square.svg">poly-square.svg</a>
d90 2
a91 2
<table cellspacing=10 cellpadding=10>
<tr><td><img src=counterclock.jpg><br><a href="counterclock.svg">counterclock.svg</a>
@


1.52
log
@site.py
@
text
@a43 3
<img class=left src=square.jpg>blah blah
<p>
<hr>
d45 1
a45 1
<table bgcolor=#FFFFFF cellpadding=10 >
@


1.51
log
@site.py
@
text
@d45 1
@


1.50
log
@site.py
@
text
@d44 1
a44 1
<img class=tight src=square.jpg>blah blah
@


1.49
log
@site.py
@
text
@d44 2
@


1.48
log
@site.py
@
text
@d46 1
a46 1
<tr><td><img src=square.jpg><br><a href="square.svg">square.svg</a>
@


1.47
log
@site.py
@
text
@d45 1
a45 1
<table bgcolor=#FFFFFF cellspacing=10 >
@


1.46
log
@site.py
@
text
@d45 1
a45 1
<table bgcolor=#FFFFFF cellspacing=10 cellpadding=10>
@


1.45
log
@site.py
@
text
@a20 1
<img class="tight" border=0 src=http://img.cba.mit.edu/images/amy_boilerbots.gif>
d45 1
a45 1
<table cellspacing=10 cellpadding=10>
@


1.44
log
@site.py
@
text
@a29 2

<li class=blend><a href="http://www.media.mit.edu/~asun/tablet.shtml"><img class=tight src="http://www.media.mit.edu/~asun/images/tablet.jpg" border=0 width=50></a>
@


1.43
log
@site.py
@
text
@d23 2
a24 8
<li><a href="http://img.cba.mit.edu/albums/">Photo Albums</a>
<li><a href="http://asun.boilerbots.com/PHOTO/">Photo Albums pre-2004</a>
<li><a href="http://img.cba.mit.edu/imagebank/">Image Bank</a>
<li><a href="http://web.media.mit.edu/~asun/shopcam/index.shtml">Shop Cam</a>
<!-- <li><a href="http://calendar.yahoo.com/amygirl_everettdog">Calendar</a> -->

<li><a href="http://fab.cba.mit.edu">FabLabs</a>
<li><a href="http://www.boilerbots.com">BoilerBots</a>
d26 1
@


1.42
log
@site.py
@
text
@d1 3
d5 39
d117 6
a122 1
<hr>
@


1.41
log
@site.py
@
text
@d1 1
a1 50
    <head>
        <title>Final Project</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="robots" content="all" />
        <style type="text/css">
            body {
                font-family:            Arial, Helvetica, sans-serif;
                font-size:              10pt;
                margin:                 0;
                color:                  #333333;
            }
            a {
                color:                  #993300;
            }
            a:hover {
                color:                  #cc9900;
            }
            h1 {
                font-size:              120%;
                margin:                 0;
                padding:                5px 10px;
                background:             #dddddd;
                border-bottom:          1px solid #333333;
            }
            h2 {
                font-size:              100%;
                margin:                 40px 0 0 0;
            }
            h3 {
                font-size:              100%;
                margin:                 0;
            }
            p {
                margin:                 5px;
            }
            ul {
                margin:                 20px 0 0 0;
                list-style-type:        none;
                padding:                0 0 0 20px;
                border-left:            1px solid #dddddd;
            }
            li {
                margin-bottom:          10px;
            }
            #root {
                width:                  500px;
                margin:                 10px auto;
            }
        </style>
    </head>
@


1.40
log
@site.py
@
text
@d1 50
@


1.39
log
@site.py
@
text
@a64 1

d67 3
d71 3
@


1.38
log
@site.py
@
text
@d40 1
a40 1
Yeay!  I started my drawing in the lower left hand corner and if I consider (0,0) as the upper right hand corner, the points are consistent with the order I drew them in.  The problem with this is that it doesn't conveniently drop into the usual coordinate system where numbers get bigger up and to the right.
d58 7
@


1.37
log
@site.py
@
text
@d53 8
a60 1
Since it's entirely up to me, I'll chose to transform the points to fit the more usual coordinate system.  "viewBox" conveniently tells me the min and max values for x and y so I can use this to offset the y.
@


1.36
log
@site.py
@
text
@d11 1
a11 1
<tr><td><img src=square.jpg>
d28 1
a28 1
<tr><td><img src=poly-square.jpg>
@


1.35
log
@site.py
@
text
@d48 3
a50 3
2) picks out the polyline points
3) offsets the y coords of the polyline points so that (0,0) is in the lower left; without flipping the shape
4) records if the shape is on the "greater than" or "less than" side of the segment
a52 5
<hr>
<br>
<A href=edit_index.html title="site_edit_link"><font size=1>edit</font></A>

<p>
@


1.34
log
@site.py
@
text
@d43 16
@


1.33
log
@site.py
@
text
@d22 2
a23 2
<hr>
Right off the bat, I notice a few things.  First, it's in centimeters.  Second, and more importantly, there are 6 points defined instead of 5 as I expect.  (I expect 5 because there are 4 vertices but the starting and ending point need to be specified explicitly to close the shape.)  
d39 4
@


1.32
log
@site.py
@
text
@d30 7
a36 1

@


1.31
log
@site.py
@
text
@d5 1
a5 1
After many daytrips down adjacent paths, this project finds a toolpath given a 2D shape described as vertices of a polyshape.
d23 12
@


1.30
log
@site.py
@
text
@d10 1
a10 1
<table cellspacing=10>
@


1.29
log
@site.py
@
text
@d10 1
a10 1
<table>
@


1.28
log
@site.py
@
text
@d18 2
a19 2
 </g>
</svg>
@


1.27
log
@site.py
@
text
@d15 3
a17 3
<svg width="26mm" height="26mm" viewBox="0 0 2600 2600">
 <g style="stroke:rgb(0,0,0);fill:none">
  <polyline points="1270,2540 0,2540 0,0 2540,0 2540,2540 1270,2540" style="fill:none"/>
@


1.26
log
@site.py
@
text
@d12 3
a14 2
<td><pre> &lg;?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
@


1.25
log
@site.py
@
text
@d12 1
a12 1
<td><pre><?xml version="1.0" encoding="UTF-8"?>
@


1.24
log
@site.py
@
text
@d20 1
d22 2
a23 2
<br>
<A href=edit_index.html title="site_edit_link"><font size=1>edit</font></A>
@


1.23
log
@site.py
@
text
@d9 11
a19 1
Evaluate real-time calc window by figuring out feed speed of machine and instr speed of micro.
d21 2
a22 36
Given a 3-D surface and assumptions about tool speed and size, and acceptable variation from desired surface topology, what is the optimal path a ball-end tool should take to minimize machining time?
<p>
<i>an aside</i> If can get active feedback from bit, want machine to dynamically recalculate toolpath to make final object more precise.
<p>
Previous work (by others)
<p>
<ul>
Sarma, S., "The Crossing Function and its Application to Zig-Zag Tool Paths," Computer-Aided Design 31 (14), 881-890, 2000.
<p><i>This paper basically says that minimizing the number of switchbacks contributes significantly to shortening machining time.  The parameter to minimize was machining time.</i>
<p>
Kim, T. and Sarma, S. E., "Toolpath generation along directions of maximum kinematic performance; a first cut at machine-optimal paths," Computer Aided Design 34 (6), 453-468, May 2002. 
<p>
<i>This paper basically utilizes material removed quantity as the minimized parameter.
</ul>
<p>
Formulating the problem:
<ul>
Problem statement: given a piece and given a desired output geometry...  generate a "smart" toolpath to generate output geometry
<p>
Problem statement (in math): something like 
<br>
<ul>f(x) = starting block 
<br>y(x) = desired geometry
<br>g = cost functions - say, number of direction changes
<p>
Goodness measurement: time (also, toolpath length incl. z direction)
<p>
Constraints: maximum depth of cut into material, x/y/z motion of tool, surface quality (?)
<p>
Assumptions: single tool (no tool changes), "2.5D" machining (x,y,z motion only, tool axis does not change), constant tool movement speed in all axes
</ul>
<p>


<p>
<A href=edit_index.html title="site_edit_link"><font size=1>edit</font></A>
@


1.22
log
@site.py
@
text
@d5 3
a7 4
Given a collection of segments, what is most optimal "fill" strategy?
<br>
Let f(x) = sum of segments
<br> how to express collisions?
@


1.21
log
@site.py
@
text
@d10 2
@


1.20
log
@site.py
@
text
@d6 3
@


1.19
log
@site.py
@
text
@d5 1
a5 1

d26 5
a30 1
Problem statement (in math):
@


1.18
log
@site.py
@
text
@d5 2
@


1.17
log
@site.py
@
text
@d17 1
a17 1
<i>This paper basically 
@


1.16
log
@site.py
@
text
@d13 1
a13 1
<p><i>This paper basically says that minimizing the number of switchbacks contributes significantly to shortening machining time.</i>
d16 2
@


1.15
log
@site.py
@
text
@d13 1
@


1.14
log
@site.py
@
text
@d11 1
d15 1
@


1.13
log
@site.py
@
text
@d11 4
@


1.12
log
@site.py
@
text
@d17 2
d21 2
a22 1
Assumptions: single tool (no tool changes), "2.5D" machining (x,y,z motion only, tool axis does not change)</ul>
@


1.11
log
@site.py
@
text
@d17 3
a19 2
Constraints: maximum depth of cut into material, x/y/z motion of tool
</ul>
@


1.10
log
@site.py
@
text
@d17 1
a17 1
Constraints: maximum depth of cut into material, 
@


1.9
log
@site.py
@
text
@d13 1
a13 1
Problem statement: given a piece and given a desired output geometry...
@


1.8
log
@site.py
@
text
@d11 12
@


1.7
log
@site.py
@
text
@d7 1
a7 1
If can get active feedback from bit, want machine to dynamically recalculate toolpath to make final object more precise.
@


1.6
log
@site.py
@
text
@d3 7
a9 1
Predict the total energy that accumulates on a known geometric volume at some location on the earth's surface.
a10 1
Oracles exist for extraterrestrial spectrum, meterological data (and some known physics of scattering, absorbtion and reflection with respect to meterological material), and absorption/reflection at the earth's surface which does not strike the measurement plate directly but reflects onto it indirectly.<br>  
@


1.5
log
@site.py
@
text
@d5 1
a5 1
Oracles are known for extraterrestrial spectrum, meterological data (and some known physics of scattering, absorbtion and reflection with respect to meterological material), and absorption/reflection at the earth's surface which does not strike the measurement plate directly but reflects onto it indirectly.<br>  
@


1.4
log
@site.py
@
text
@d5 1
a5 1
oracles are known for extraterrestrial spectrum, meterological data (and some known physics of scattering, absorbtion and reflection with respect to meterological material), and absorption/reflection at the earth's surface which does not strike the measurement plate directly but reflects onto it indirectly.<br>
@


1.3
log
@site.py
@
text
@d1 3
a3 1
predict the total energy that accumulates on a known geometric volume at some location on the earth's surface.
@


1.2
log
@site.py
@
text
@d3 2
a4 2
oracles are known for extraterrestrial spectrum, meterological data (and some known physics of scattering, absorbtion and reflection with respect to meterological material), and absorption/reflection at the earth's surface which does not strike the measurement plate.<br>
<A href=edit_index.html title="site_edit_link"><font size=1>edit</font></A>
@


1.1
log
@site.py
@
text
@d1 1
a1 1
calculate the total energy that accumulates on a known geometric volume at some location on the earth's surface.
@
