Superellipse: Difference between revisions
m
→{{header|Raku}}: redundant 'flat's
SqrtNegInf (talk | contribs) (→{{header|Raku}}: simplified) |
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: redundant 'flat's) |
||
Line 1,313:
# y in terms of x
sub y ($x) { floor b × (1 - ($x
# find point pairs for one quadrant
Line 1,320:
my $out = open('superellipse.svg', :w);
$out.print: [~] qq|<svg height="{b×2}" width="{a×2}" xmlns="http://www.w3.org/2000/svg">\n|,
pline(
pline(
pline(
pline(
'</svg>';
sub pline (@q) {
|