-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
598 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Antimony 0.7.5 | ||
-------------- | ||
|
||
This is a pretty minor release feature-wise, but it's got a few simple | ||
fixes that will speed up performance when designing large models. | ||
|
||
**Features:** | ||
- More nodes (thanks, Neil!). | ||
- Limit size of script output window. | ||
- Adding `str` input type for scripting | ||
|
||
**Bugfixes:** | ||
- Cache certain types of lookups to make redrawing graph window faster. | ||
- Improve node change detection to make adding new nodes faster. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Neil Gershenfeld 2/14/15 | ||
|
||
import fab | ||
|
||
title('polygon') | ||
|
||
def polygon_radius(x0,y0,N,r): | ||
from fab.types import Shape, Transform | ||
# max_n((X-x0)*xn+(Y-y0)*yn-r) | ||
s = 'f-1' | ||
xmin = 1e10 | ||
xmax = -1e10 | ||
ymin = 1e10 | ||
ymax = -1e10 | ||
N = int(N) | ||
for n in range(N): | ||
xn = math.sin((2*math.pi*n)/N) | ||
yn = -math.cos((2*math.pi*n)/N) | ||
s = 'a'+s+'-+*-Xf'+str(x0)+'f'+str(xn)+'*-Yf'+str(y0)+'f'+str(yn)+'f'+str(r) | ||
xv = x0+r*math.sin((2*math.pi*(0.5+n))/N)/math.cos((2*math.pi*0.5)/N) | ||
yv = y0-r*math.cos((2*math.pi*(0.5+n))/N)/math.cos((2*math.pi*0.5)/N) | ||
if (xv < xmin): xmin = xv | ||
if (xv > xmax): xmax = xv | ||
if (yv < ymin): ymin = yv | ||
if (yv > ymax): ymax = yv | ||
return Shape(s,xmin,ymin,xmax,ymax) | ||
|
||
input('x0',float,0) | ||
input('y0',float,0) | ||
input('N',float,5) | ||
input('r',float,1) | ||
|
||
output('shape',polygon_radius(x0,y0,N,r)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.