chiark
/
gitweb
/
~ianmdlvl
/
reprap-play.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
quacks-ingredients: wip counts
[reprap-play.git]
/
quacks-ingredients-counts
diff --git
a/quacks-ingredients-counts
b/quacks-ingredients-counts
index 870970a9c718d296b1aca93b2a98ac8780ae34b1..6ee3500196c5dcf72a75a6b7003f9b09409d6233 100755
(executable)
--- a/
quacks-ingredients-counts
+++ b/
quacks-ingredients-counts
@@
-29,16
+29,17
@@
sub wrtoplevel () {
my $nrows = ceil($total / $rowsz);
my $ix = 0;
print "// total=$total, rowsz=$rowsz, nrows=$nrows\n";
my $nrows = ceil($total / $rowsz);
my $ix = 0;
print "// total=$total, rowsz=$rowsz, nrows=$nrows\n";
- foreach my $n
d
ots (sort keys %$cs) {
- my $c = $cs->{$n
d
ots};
+ foreach my $n
sp
ots (sort keys %$cs) {
+ my $c = $cs->{$n
sp
ots};
print <<END;
union(){
print <<END;
union(){
- \$ndots = $ndots;
+ Frame(\$phase, token_pitch * [ $rowsz + 0.5, $nrows ]);
+ \$nspots = $nspots;
END
while ($c--) {
my $xy = sprintf "[ %5.1f, %5.1f ]",
END
while ($c--) {
my $xy = sprintf "[ %5.1f, %5.1f ]",
-
$ix / $nrows - 0.5 * $rowsz
,
- $ix % $nrows - 0.5 *
$nrows
;
+
int($ix / $nrows) - 0.5 * ($rowsz-1)
,
+ $ix % $nrows - 0.5 *
($nrows-1)
;
print " translate(token_pitch * $xy) Token_L();\n";
$ix++;
}
print " translate(token_pitch * $xy) Token_L();\n";
$ix++;
}