Skip to content

Commit 5af7a08

Browse files
committed
Spelling error: rhombi, not rhombii
1 parent aece230 commit 5af7a08

File tree

87 files changed

+625
-625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+625
-625
lines changed

.DS_Store

0 Bytes
Binary file not shown.

C/controls.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void execute_SVG_PostProcessing(
2121
extern char scratchString[];
2222
if( AnyPostProcessing )
2323
{
24-
if( ef == SVG_arcs || numCharsThisFile < 10737418240 ) // 10 MiB. Limit very different for arcs and rhombii. https://issues.chromium.org/issues/390969197
24+
if( ef == SVG_arcs || numCharsThisFile < 10737418240 ) // 10 MiB. Limit very different for arcs and rhombi. https://issues.chromium.org/issues/390969197
2525
{
2626
// Change next line to invoke your preferred browser.
2727
sprintf(scratchString, "open -a '/Applications/Google Chrome.app' 'file://%s'", fileName);
@@ -80,7 +80,7 @@ bool exportQ(ExportWhat const exprtWhat, ExportFormat const exportFormat, cons
8080
return( 10 + numLinesThisFile + tlngP->numPathStats < ExcelMaxNumRows );
8181
case Paths:
8282
return( 10 + numLinesThisFile + tlngP->numPathsClosed + tlngP->numPathsOpen < ExcelMaxNumRows - 10240 ); // Leaving space for subsequent pathStats
83-
case Rhombii:
83+
case Rhombi:
8484
return( 10 + numLinesThisFile + tlngP->numFats + tlngP->numThins < ExcelMaxNumRows - 10240 ); // Leaving space for subsequent pathStats
8585
} // switch(exprtWhat)
8686
break; // Redundant
@@ -101,7 +101,7 @@ bool holesFillQ(const Tiling * const tlngP)
101101

102102

103103

104-
// These can be changed to show, in SVG, only a subset of the rhombii.
104+
// These can be changed to show, in SVG, only a subset of the rhombi.
105105
// Comments have example, as used to make image in documentation.
106106
// These y values are as generated by C code; SVG's y values are -1* these.
107107
const double svg_toPaint_xMin(const Tiling * const tlngP) {return -999999;} // -0.09830056, from tilingId==10, paths 13 and 30, + edgeLength * Sin(18)

C/exportTiling.c

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void tiling_export(
5555
{
5656
long int rhombCounter = 0, pathCounter = 0;
5757
for( rhId = 0 ; rhId < tlngP->numFats + tlngP->numThins ; rhId++ )
58-
if( tlngP->rhombii[rhId].wantedPostScript )
58+
if( tlngP->rhombi[rhId].wantedPostScript )
5959
tlngP->wantedPostScriptRhombNum[rhId] = (rhombCounter ++);
6060
else
6161
tlngP->wantedPostScriptRhombNum[rhId] = -1;
@@ -68,9 +68,9 @@ void tiling_export(
6868

6969
(*numCharsThisFileP) += fIndent(fp, indentDepth);
7070
(*numCharsThisFileP) += fprintf(fp,
71-
"<< %% + tilingId=%" PRIi8 ", in which numFats=%li, numThins=%li, numPathsClosed=%li, numPathsOpen=%li, numWantedRhombii=%li, NumWantedPaths=%li\n",
71+
"<< %% + tilingId=%" PRIi8 ", in which numFats=%li, numThins=%li, numPathsClosed=%li, numPathsOpen=%li, numWantedRhombi=%li, NumWantedPaths=%li\n",
7272
tilingId, tlngP->numFats, tlngP->numThins, tlngP->numPathsClosed, tlngP->numPathsOpen,
73-
tlngP->wantedPostScriptNumberRhombii, tlngP->wantedPostScriptNumberPaths
73+
tlngP->wantedPostScriptNumberRhombi, tlngP->wantedPostScriptNumberPaths
7474
);
7575
(*numLinesThisFileP) ++;
7676

@@ -108,8 +108,8 @@ void tiling_export(
108108

109109
(*numCharsThisFileP) += fIndent(fp, 1 + indentDepth);
110110
(*numCharsThisFileP) += fprintf(fp,
111-
"/wantedPostScriptNumberRhombii %li /wantedPostScriptNumberPaths %li %% [ WhollyOutside RhombOutPathIn RhombPartlyIn RhombWhollyIn ]\n",
112-
tlngP->wantedPostScriptNumberRhombii, tlngP->wantedPostScriptNumberPaths
111+
"/wantedPostScriptNumberRhombi %li /wantedPostScriptNumberPaths %li %% [ WhollyOutside RhombOutPathIn RhombPartlyIn RhombWhollyIn ]\n",
112+
tlngP->wantedPostScriptNumberRhombi, tlngP->wantedPostScriptNumberPaths
113113
);
114114
(*numLinesThisFileP) ++;
115115

@@ -174,32 +174,32 @@ void tiling_export(
174174
} // if exportPaths
175175

176176

177-
if( exportQ(Rhombii, exportFormat, tlngP, *numLinesThisFileP) )
177+
if( exportQ(Rhombi, exportFormat, tlngP, *numLinesThisFileP) )
178178
{
179179
(*numCharsThisFileP) += fIndent(fp, 1 + indentDepth);
180180
(*numCharsThisFileP) += fprintf(fp,
181-
"/Rhombii %li array %% + /Rhombii: tilingId=%" PRIi8 ", numFats=%li, numThins=%li, wantedPostScriptNumberRhombii=%li, wantedPostScriptNumberPaths=%li\n",
182-
tlngP->wantedPostScriptNumberRhombii,
181+
"/Rhombi %li array %% + /Rhombi: tilingId=%" PRIi8 ", numFats=%li, numThins=%li, wantedPostScriptNumberRhombi=%li, wantedPostScriptNumberPaths=%li\n",
182+
tlngP->wantedPostScriptNumberRhombi,
183183
tlngP->tilingId, tlngP->numFats, tlngP->numThins,
184-
tlngP->wantedPostScriptNumberRhombii, tlngP->wantedPostScriptNumberPaths
184+
tlngP->wantedPostScriptNumberRhombi, tlngP->wantedPostScriptNumberPaths
185185
);
186186
(*numLinesThisFileP) ++;
187187
// PostScript arrays limited to 2^16 elements, so outputting only those wanted.
188188
for(rhNumOutput = rhId = 0 ; rhId < tlngP->numFats + tlngP->numThins ; rhId++)
189-
if( tlngP->rhombii[rhId].wantedPostScript )
189+
if( tlngP->rhombi[rhId].wantedPostScript )
190190
{
191191
(*numCharsThisFileP) += fIndent(fp, 2 + indentDepth);
192192
(*numCharsThisFileP) += fprintf(fp, "dup %li ", rhNumOutput++);
193-
rhombus_export(fp, exportFormat, tlngP, tlngP->rhombii + rhId, (rhId < tlngP->numFats + tlngP->numThins - 1), numCharsThisFileP );
193+
rhombus_export(fp, exportFormat, tlngP, tlngP->rhombi + rhId, (rhId < tlngP->numFats + tlngP->numThins - 1), numCharsThisFileP );
194194
(*numCharsThisFileP) += fprintf(fp, " put\n");
195195
(*numLinesThisFileP) ++;
196196
}
197197
(*numCharsThisFileP) += fIndent(fp, 1 + indentDepth);
198198
(*numCharsThisFileP) += fprintf(fp,
199-
"%% - /Rhombii: tilingId=%" PRIi8 ", numFats=%li, numThins=%li, numPathsClosed=%li, "
200-
"numPathsOpen=%li, wantedPostScriptNumberRhombii=%li, wantedPostScriptNumberPaths=%li\n",
199+
"%% - /Rhombi: tilingId=%" PRIi8 ", numFats=%li, numThins=%li, numPathsClosed=%li, "
200+
"numPathsOpen=%li, wantedPostScriptNumberRhombi=%li, wantedPostScriptNumberPaths=%li\n",
201201
tilingId, tlngP->numFats, tlngP->numThins, tlngP->numPathsClosed, tlngP->numPathsOpen,
202-
tlngP->wantedPostScriptNumberRhombii, tlngP->wantedPostScriptNumberPaths
202+
tlngP->wantedPostScriptNumberRhombi, tlngP->wantedPostScriptNumberPaths
203203
);
204204
(*numLinesThisFileP) ++;
205205
(*numCharsThisFileP) += fprintf(fp,
@@ -209,15 +209,15 @@ void tiling_export(
209209
TextLicence, TextURL, TextAuthor
210210
);
211211
(*numLinesThisFileP) += 3;
212-
} // if exportRhombii
212+
} // if exportRhombi
213213

214214
(*numCharsThisFileP) += fIndent(fp, indentDepth);
215215
(*numCharsThisFileP) += fprintf(fp, ">> %% - tilingId=%" PRIi8 "\n", tilingId);
216216
(*numLinesThisFileP) ++;
217217
(*numCharsThisFileP) += fIndent(fp, indentDepth);
218218
(*numCharsThisFileP) += fprintf(fp,
219-
"(After ) usertime usertimeStart sub 1000 div 12 string cvs Concatenate ( seconds execution, interpreted tilingId=%" PRIi8 ", containing %li rhombii) Concatenate = flush\n",
220-
tilingId, tlngP->wantedPostScriptNumberRhombii
219+
"(After ) usertime usertimeStart sub 1000 div 12 string cvs Concatenate ( seconds execution, interpreted tilingId=%" PRIi8 ", containing %li rhombi) Concatenate = flush\n",
220+
tilingId, tlngP->wantedPostScriptNumberRhombi
221221
);
222222
(*numLinesThisFileP) ++;
223223

@@ -290,9 +290,9 @@ void tiling_export(
290290

291291
(*numCharsThisFileP) += fIndent(fp, 1 + indentDepth);
292292
(*numCharsThisFileP) += fprintf(fp,
293-
"\"WantedPostScriptNumberRhombii\":%li, \"WantedPostScriptNumberPaths\":%li,"
293+
"\"WantedPostScriptNumberRhombi\":%li, \"WantedPostScriptNumberPaths\":%li,"
294294
"\"Licence\":\"%s\", \"URL\":\"%s\", \"Author\":\"%s\"," "\n",
295-
tlngP->wantedPostScriptNumberRhombii, tlngP->wantedPostScriptNumberPaths,
295+
tlngP->wantedPostScriptNumberRhombi, tlngP->wantedPostScriptNumberPaths,
296296
TextLicence, TextURL, TextAuthor
297297
);
298298
(*numLinesThisFileP) ++;
@@ -330,23 +330,23 @@ void tiling_export(
330330
(*numLinesThisFileP) ++;
331331
} // if exportPaths
332332

333-
if( exportQ(Rhombii, exportFormat, tlngP, *numLinesThisFileP) )
333+
if( exportQ(Rhombi, exportFormat, tlngP, *numLinesThisFileP) )
334334
{
335335
(*numCharsThisFileP) += fIndent(fp, 1 + indentDepth);
336-
(*numCharsThisFileP) += fprintf(fp, "\"Rhombii\":[\n");
336+
(*numCharsThisFileP) += fprintf(fp, "\"Rhombi\":[\n");
337337
(*numLinesThisFileP) ++;
338338
for(rhId=0; rhId < tlngP->numFats + tlngP->numThins; rhId++)
339339
{
340340
(*numCharsThisFileP) += fIndent(fp, 2 + indentDepth);
341-
rhombus_export( fp, exportFormat, tlngP, &(tlngP->rhombii[rhId]), (rhId < tlngP->numFats + tlngP->numThins - 1), numCharsThisFileP);
341+
rhombus_export( fp, exportFormat, tlngP, &(tlngP->rhombi[rhId]), (rhId < tlngP->numFats + tlngP->numThins - 1), numCharsThisFileP);
342342
(*numCharsThisFileP) += fprintf(fp, "\n");
343343
(*numLinesThisFileP) ++;
344344
} // rhId
345345

346346
(*numCharsThisFileP) += fIndent(fp, 1 + indentDepth);
347347
(*numCharsThisFileP) += fprintf(fp, "]\n");
348348
(*numLinesThisFileP) ++;
349-
} // if exportRhombii
349+
} // if exportRhombi
350350

351351
(*numCharsThisFileP) += fIndent(fp, indentDepth);
352352
(*numCharsThisFileP) += fprintf(fp, notLast ? "},\n" : "}\n");
@@ -362,7 +362,7 @@ void tiling_export(
362362
"\tT_%02" PRIi8 ".NumFats" "\tT_%02" PRIi8 ".NumThins" "\tT_%02" PRIi8 ".NumPathsClosed" "\tT_%02" PRIi8 ".NumPathsOpen" "\tT_%02" PRIi8 ".NumPathStats"
363363
"\tT_%02" PRIi8 ".MinX" "\tT_%02" PRIi8 ".MaxX" "\tT_%02" PRIi8 ".MinY" "\tT_%02" PRIi8 ".MaxY"
364364
"\tT_%02" PRIi8 ".WantedPostScriptCentreX" "\tT_%02" PRIi8 ".WantedPostScriptCentreY" "\tT_%02" PRIi8 ".WantedPostScriptAspect" "\tT_%02" PRIi8 ".WantedPostScriptHalfWidth" "\tT_%02" PRIi8 ".WantedPostScriptHalfHeight"
365-
"\tT_%02" PRIi8 ".WantedPostScriptNumberRhombii" "\tT_%02" PRIi8 ".WantedPostScriptNumberPaths"
365+
"\tT_%02" PRIi8 ".WantedPostScriptNumberRhombi" "\tT_%02" PRIi8 ".WantedPostScriptNumberPaths"
366366
"\tT_%02" PRIi8 ".Licence" "\tT_%02" PRIi8 ".URL" "\tT_%02" PRIi8 ".Author" "\n",
367367
tlngP->tilingId, tlngP->tilingId, tlngP->tilingId,
368368
tlngP->tilingId, tlngP->tilingId, tlngP->tilingId, tlngP->tilingId, tlngP->tilingId,
@@ -386,7 +386,7 @@ void tiling_export(
386386
(*numCharsThisFileP) += fprintf(fp, "%s", scratchString);
387387
(*numCharsThisFileP) += fprintf(fp,
388388
"\t%li" "\t%li \t%s" "\t%s" "\t%s" "\n\n",
389-
tlngP->wantedPostScriptNumberRhombii, tlngP->wantedPostScriptNumberPaths,
389+
tlngP->wantedPostScriptNumberRhombi, tlngP->wantedPostScriptNumberPaths,
390390
TextLicence, TextURL, TextAuthor // Do not stringClean() these, as that would mess with dots.
391391
);
392392
(*numLinesThisFileP) += 2;
@@ -429,7 +429,7 @@ void tiling_export(
429429
} // pathId
430430
} // if ... exportQ(Paths, ...)
431431

432-
if( (tlngP->numThins > 0 || tlngP->numFats > 0) && exportQ(Rhombii, exportFormat, tlngP, *numLinesThisFileP) )
432+
if( (tlngP->numThins > 0 || tlngP->numFats > 0) && exportQ(Rhombi, exportFormat, tlngP, *numLinesThisFileP) )
433433
{
434434
(*numCharsThisFileP) += fprintf(fp, "\n");
435435
(*numLinesThisFileP) ++;
@@ -438,11 +438,11 @@ void tiling_export(
438438
(*numLinesThisFileP) ++;
439439
for(rhId=0; rhId < tlngP->numFats + tlngP->numThins; rhId++)
440440
{
441-
rhombus_export(fp, exportFormat, tlngP, &(tlngP->rhombii[rhId]), (rhId < tlngP->numFats + tlngP->numThins - 1), numCharsThisFileP);
441+
rhombus_export(fp, exportFormat, tlngP, &(tlngP->rhombi[rhId]), (rhId < tlngP->numFats + tlngP->numThins - 1), numCharsThisFileP);
442442
(*numCharsThisFileP) += fprintf(fp, "\n");
443443
(*numLinesThisFileP) ++;
444444
} // rhId
445-
} // if ... exportQ(Rhombii, ...)
445+
} // if ... exportQ(Rhombi, ...)
446446

447447
(*numCharsThisFileP) += fprintf(fp, "\n\n\n");
448448
(*numLinesThisFileP) += 3;

C/export_PaintArcsPS.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
The ExportFormats export as data: arrays of stuff.
1111
But PostScript's maximum array length is 65535.
1212
So this code just outputs raw PostScript instructions, one after the other.
13-
All painting is determined one rhombus at a time: rhombii are not stored in a way that allows reasoning at a less-local level than one-at-a-time.
13+
All painting is determined one rhombus at a time: rhombi are not stored in a way that allows reasoning at a less-local level than one-at-a-time.
1414
There is some room for post-C hand editing of the PostScript, but much less flexibly the the other PostScript data format.
15-
There limit on the number of rhombii is printer memory and resolution, so much much larger than 2^16.
15+
There limit on the number of rhombi is printer memory and resolution, so much much larger than 2^16.
1616
1717
Because this is just raw PostScript commands, this exporting C code does not have the structure of the other formats' C code.
1818
It is different and stand-alone.
@@ -191,8 +191,8 @@ void tiling_export_PaintArcsPS(
191191
"} bind def %% /ConcatenateToMark\n"
192192
"\n"
193193
"() =\n"
194-
"/NumRhombii NumFats NumThins add def\n"
195-
"[/TilingId /DataAsOf /NumFats /NumThins /NumRhombii /EdgeLength /XMin /XMax /YMin /YMax /ToPaint_XMin /ToPaint_XMax /ToPaint_YMin /ToPaint_YMax]\n"
194+
"/NumRhombi NumFats NumThins add def\n"
195+
"[/TilingId /DataAsOf /NumFats /NumThins /NumRhombi /EdgeLength /XMin /XMax /YMin /YMax /ToPaint_XMin /ToPaint_XMax /ToPaint_YMin /ToPaint_YMax]\n"
196196
"{\n"
197197
"\tdup 12 string cvs ( = ) Concatenate exch load\n"
198198
"\tdup type /stringtype eq {(\") exch (\") Concatenate Concatenate} {16 string cvs} ifelse\n"
@@ -271,7 +271,7 @@ void tiling_export_PaintArcsPS(
271271
if( 1 == pathP->pathClosedTypeNum % 2 )
272272
{
273273
rhIdStart = rhId = pathP->rhId_PathCentreClosest;
274-
rhP = &(tlngP->rhombii[rhIdStart]);
274+
rhP = &(tlngP->rhombi[rhIdStart]);
275275
edgeStartE = edgeE = (
276276
pow(rhP->east.x - pathP->centre.x, 2) + pow(rhP->east.y - pathP->centre.y, 2) <=
277277
pow(rhP->west.x - pathP->centre.x, 2) + pow(rhP->west.y - pathP->centre.y, 2)
@@ -280,7 +280,7 @@ void tiling_export_PaintArcsPS(
280280
else
281281
{
282282
rhIdStart = rhId = pathP->rhId_PathCentreFurthest;
283-
rhP = &(tlngP->rhombii[rhIdStart]);
283+
rhP = &(tlngP->rhombi[rhIdStart]);
284284
edgeStartE = edgeE = (
285285
pow(rhP->east.x - pathP->centre.x, 2) + pow(rhP->east.y - pathP->centre.y, 2) >=
286286
pow(rhP->west.x - pathP->centre.x, 2) + pow(rhP->west.y - pathP->centre.y, 2)
@@ -361,7 +361,7 @@ void tiling_export_PaintArcsPS(
361361
foundNeighbour = true;
362362
nnn = rhP->neighbours[nghbrNum].nghbrsNghbrNum;
363363
rhId = rhP->neighbours[nghbrNum].rhId;
364-
rhP = &(tlngP->rhombii[rhId]);
364+
rhP = &(tlngP->rhombi[rhId]);
365365
edgeN = rhP->neighbours[ nnn ].touchesN;
366366
edgeE = rhP->neighbours[ nnn ].touchesE;
367367
break; // nghbrNum loop
@@ -406,7 +406,7 @@ void tiling_export_PaintArcsPS(
406406
(*numLinesThisFileP) += 3 ;
407407
for( rhId = 0 ; rhId < tlngP->numFats + tlngP->numThins ; rhId ++ )
408408
{
409-
rhP = &(tlngP->rhombii[rhId]);
409+
rhP = &(tlngP->rhombi[rhId]);
410410
either = false;
411411
angThisStart = rhP->angleDegrees + (Fat == rhP->physique ? 36 : 72 );
412412
if(angThisStart >= 180) angThisStart -= 360;

C/export_PaintArcsSVG.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void tiling_export_PaintArcsSVG(
3232

3333
for( rhId = 0 ; rhId < tlngP->numFats + tlngP->numThins ; rhId ++ )
3434
{
35-
rhP = &(tlngP->rhombii[rhId]);
35+
rhP = &(tlngP->rhombi[rhId]);
3636
x = (rhP->north.x + rhP->east.x) / 2;
3737
y = (rhP->north.y + rhP->east.y) / 2;
3838
if( allMaxX < x ) allMaxX = x;
@@ -168,7 +168,7 @@ void tiling_export_PaintArcsSVG(
168168
if( 1 == pathP->pathClosedTypeNum % 2 )
169169
{
170170
rhIdStart = rhId = pathP->rhId_PathCentreClosest;
171-
rhP = &(tlngP->rhombii[rhIdStart]);
171+
rhP = &(tlngP->rhombi[rhIdStart]);
172172
edgeStartE = edgeE = (
173173
pow(rhP->east.x - pathP->centre.x, 2) + pow(rhP->east.y - pathP->centre.y, 2) <=
174174
pow(rhP->west.x - pathP->centre.x, 2) + pow(rhP->west.y - pathP->centre.y, 2)
@@ -177,7 +177,7 @@ void tiling_export_PaintArcsSVG(
177177
else
178178
{
179179
rhIdStart = rhId = pathP->rhId_PathCentreFurthest;
180-
rhP = &(tlngP->rhombii[rhIdStart]);
180+
rhP = &(tlngP->rhombi[rhIdStart]);
181181
edgeStartE = edgeE = (
182182
pow(rhP->east.x - pathP->centre.x, 2) + pow(rhP->east.y - pathP->centre.y, 2) >=
183183
pow(rhP->west.x - pathP->centre.x, 2) + pow(rhP->west.y - pathP->centre.y, 2)
@@ -273,7 +273,7 @@ void tiling_export_PaintArcsSVG(
273273
foundNeighbour = true;
274274
nnn = rhP->neighbours[nghbrNum].nghbrsNghbrNum;
275275
rhId = rhP->neighbours[nghbrNum].rhId;
276-
rhP = &(tlngP->rhombii[rhId]);
276+
rhP = &(tlngP->rhombi[rhId]);
277277
edgeN = rhP->neighbours[ nnn ].touchesN;
278278
edgeE = rhP->neighbours[ nnn ].touchesE;
279279
break; // nghbrNum loop
@@ -313,7 +313,7 @@ void tiling_export_PaintArcsSVG(
313313
(*numLinesThisFileP) += 3 ;
314314
for( rhId = 0 ; rhId < tlngP->numFats + tlngP->numThins ; rhId ++ )
315315
{
316-
rhP = &(tlngP->rhombii[rhId]);
316+
rhP = &(tlngP->rhombi[rhId]);
317317

318318
if( ( (Thin == rhP->physique) != (0 == physiqueCounter) )
319319
|| rhP->xMax < actual_xMin

0 commit comments

Comments
 (0)