[Freeciv-Dev] Re: RFC: 8-topology system
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Raimar Falke wrote:
>
> On Tue, Oct 16, 2001 at 06:22:35PM -0400, Jason Dorje Short wrote:
> > Raimar Falke wrote:
> > >
> > > I think that another shape is good. This may be of no real use but it
> > > allows use to test the code. And a non-isometric ellipse has the
> > > semantics of most north <=> y=0. Also such an ellipse will also have
> > > non-real tiles in the rectangular xsize*ysize.
> > > C
> > > # # # # # # # # # # #
> > > # # # # # # # # # # # # # # # # #
> > > # # # # # # # # # # # # # # # # # # #
> > > # # # # # # # # # # # # # # # # # # # # #
> > > # # # # # # # # # # # # # # # # # # # # # # #
> > > # # # # # # # # # # # # # # # # # # # # # # # # #
> > > # # # # # # # # # # # # # # # # # # # # # # # # #
> > > # # # # # # # # # # # # # # # # # # # # # # # # #
> > > A # # # # # # # # # # # # # # # # # # # # # # # # # B
> > > # # # # # # # # # # # # # # # # # # # # # # # # #
> > > # # # # # # # # # # # # # # # # # # # # # # # # #
> > > # # # # # # # # # # # # # # # # # # # # # # # # #
> > > # # # # # # # # # # # # # # # # # # # # # # #
> > > # # # # # # # # # # # # # # # # # # # # #
> > > # # # # # # # # # # # # # # # # # # #
> > > # # # # # # # # # # # # # # # # #
> > > # # # # # # # # # # #
> > > D
> This figure was done with:
> ------
> a=13
> b=9
>
> for y in range(-10,11):
> for x in range(-15,16):
> if x*x*b*b+a*a*y*y<=a*a*b*b:
> print "#",
> else:
> print " ",
> print
int main(int argc, char** argv)
{
int a, b;
int x, y;
if (argc != 3)
printf("Ugh.\n");
sscanf(argv[1], "%d", &a);
sscanf(argv[2], "%d", &b);
a++;
b++;
for (y = -b; y<=b; y++) {
for (x = -a; x <= a; x++) {
char c = ' ';
if (x*x*b*b + y*y*a*a < a*a*b*b)
c = '#';
printf("%c ", c);
}
printf("\n");
}
}
[jshort@jason freeciv]$ gcc test.c
[jshort@jason freeciv]$ ./a.out 13 9
# # # # # # # # # # # # #
# # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # #
# # # # # # # # # # # # #
[jshort@jason freeciv]$
Attached is a 40x20 (really 80x40) ellipse.
Now, the next question: iso-ellipses. Obviously we need them, but the
math will be even trickier. Do we have an ellipse inside an
iso-rectangle inside a flat rectangle (which is what's done for
iso-rectangles), or do we try to plant the ellipse directly within the
rectangle?
jason
# # # # # # # # # # #
# # # # # # # # # # # # # #
# # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # #
# # # # # # # # # # #
# # # # # # # # # # # # # #
- [Freeciv-Dev] RFC: 8-topology system, Jason Dorje Short, 2001/10/16
- [Freeciv-Dev] Re: RFC: 8-topology system, Raimar Falke, 2001/10/16
- [Freeciv-Dev] Re: RFC: 8-topology system, Jason Dorje Short, 2001/10/16
- [Freeciv-Dev] Re: RFC: 8-topology system, Raimar Falke, 2001/10/16
- [Freeciv-Dev] Re: RFC: 8-topology system, Jason Dorje Short, 2001/10/16
- [Freeciv-Dev] Re: RFC: 8-topology system,
Jason Dorje Short <=
- [Freeciv-Dev] Re: RFC: 8-topology system, Jason Dorje Short, 2001/10/17
- [Freeciv-Dev] Re: RFC: 8-topology system, Raimar Falke, 2001/10/17
- [Freeciv-Dev] Re: RFC: 8-topology system, Jason Dorje Short, 2001/10/17
- [Freeciv-Dev] Re: RFC: 8-topology system, Raimar Falke, 2001/10/17
- [Freeciv-Dev] Re: RFC: 8-topology system, Jason Dorje Short, 2001/10/17
- [Freeciv-Dev] Re: RFC: 8-topology system, Miguel Farah F., 2001/10/16
- [Freeciv-Dev] Re: RFC: 8-topology system, Jason Dorje Short, 2001/10/16
- [Freeciv-Dev] Re: RFC: 8-topology system, Raimar Falke, 2001/10/17
[Freeciv-Dev] Re: RFC: 8-topology system, Jason Dorje Short, 2001/10/16
|
|