Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2000:
[Freeciv-Dev] Re: New River Generator
Home

[Freeciv-Dev] Re: New River Generator

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Erik Sigra <freeciv@xxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: New River Generator
From: Stan Shebs <shebs@xxxxxxxxxxxxxxxxx>
Date: Fri, 15 Sep 2000 20:28:33 -0700
Reply-to: shebs@xxxxxxxxxxxxxxxxx

Erik Sigra wrote:
> 
> * "Erik" == Erik Sigra schrieb am Tue, 05 Sep 2000 14:25:22 +0200:
> > By the way, does anyone know how to visualize heights on the map,
> > like in Alpha Centauri?
> 
> Now I have a related question: Is it at all possible to visualize heights 
> with an overhead view, with results as good as with an isometric view? If it 
> is possible, I could settle with an overhead map because an isometric view 
> doesn't seem to be to popular around here. Visualization of heights is really 
> the only good reason I have for wanting an isometric view.
> 
> So does anyone know something I haven't thought of in this issue?

There are several common ways to visualize heights.  One is to shade
the slopes, darker for steeper slopes.  Another is to color-code,
such as with a green->yellow->brown->white progression.  Hard to
make work right with different terrain types.  Finally, you can draw
contour lines.

For Xconq I came up with a pretty effective algorithm that can draw
contour lines for each cell individually, so it works well for rect
updates.  Just assign elevations to cell corners that are averages,
then iterate over contour lines (there are usually only 15-20 in all)
and interpolate to get straight line segments in the cell.  The
straight lines will join properly at cell edges but usually be at
different angles, so the net effect is the typical curvy patterns.
The algorithm is in Xconq's kernel/ui.c:contour_lines_at, along with
some additional description.  It's GPL of course, so you're free to
use it if you like.

Stan
shebs@xxxxxxxxxxxxxxxxx



[Prev in Thread] Current Thread [Next in Thread]