50
xx
xxxx
xxxxxx
xxxxxxxx
xxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
xx
#include <iostream>
#include <cmath>
usingnamespace std;
bool inside( double a, double b, int n, double x, double y )
{
double theta = atan2( y, x );
double S = sin( n * theta );
double r = sqrt( x * x + y * y );
return r <= a + b * abs( S ) || ( abs( x ) <= 1 && y <= -a );
}
int main()
{
for ( int r = 0; r < 50; r++ )
{
for ( int c = 0; c < 50; c++ )
{
cout << ( inside( 18, 4, 6, c - 25, 22 - r ) ? '*' : ' ' );
}
cout << '\n';
}
}
the world has long needed a perfectly square font to be put into consoles etc. They are out there, mostly for web, but I dunno if you could force it into the forum.