open All Channels
seplocked EVE Technology Lab
blankseplocked Map Plotting Help
 
This thread is older than 90 days and has been locked due to inactivity.


 
Author Topic

Benign Sage
Posted - 2011.04.05 17:42:00 - [1]
 

Hello fellow devs! I come to you asking for some advice. Prologue: I have been programming an Alliance website (PHP) for a few months now, lots of features (more to come), and now I am working on making some simple maps (solar systems, regions, etc.), on a variable sized canvas (calculating to make points fit). I have tried to make a few maps and I am not getting very satisfactory results. I am using the mapDenormalzie table, filtering down to a specific solar system/region, and plotting the X and Z coordinates. I am being returned a cluster of points that don't look that great. This is a sample of what is generated:

Please visit your user settings to re-enable images.

Question Can anyone give me some advice on creating some sexy maps? I believe I am missing something fundamentally simple. I have seen a lot of nice maps some of you guys have created and if you'd be willing to share some info to help me get started in plotting some simple maps it would be much appreciated!

PS: I apologize if this was previously discussed, I tried searching for a few days but didn't find anything very useful (CCP grant us advanced search abilities! Idea).

PPS: If you need any more info let me know and I will be glad to provide.

Thanks!

Benign Sage

Celebrain
1st Steps Academy
Fidelas Constans
Posted - 2011.04.05 23:28:00 - [2]
 

Creating "nice looking" maps is a bit of an art really, as well as a bunch of math, and a whole lot of data manipulation. You need to be good at all these things to do well at it.

You probably don't just want a few dots, but you also want to link them with the jumps, right? You probably also want it centered and zoomed so that certain systems are filling the canvas, right?

To give you some ideas, here's what I've created:
http://www.eveiverse.com/maps

If you have more specific questions, I (and others) might be willing to answer more specifically.

Benign Sage
Posted - 2011.04.06 00:39:00 - [3]
 

Celebrain,

Thanks for the response, you are exactly right, what you mentioned is exactly what I'd like to do (plot points, link jumps, zoom, etc). I took a look at your map, excellent work! I am not familiar with the Google APIs but could always learn. Basically, I have everything in my head of what I want and the type of data I need to get to, but can't seem to think of how to get there.

I guess what I have are 2 separate things, Solar Systems vs Regions. A solar system, theoretically should be easy. Center point being a star, planets orbiting star, moons orbiting planets. I imagine it as find distance of planet from star (radius), which orbits in a circle, find points around circumference, place dot somewhere on one of those points. Do same for rest of planets, staggering them around the corresponding circumferences to look nice, if placing moons around planets do the same. Haven't tried this yet as I have been playing with regions for time being.

With regions, constellations, and the related it becomes mapping the points on an X,Y coordinate plane (again this is all in my mind). Somehow I need to get the huge coordinates in the mapDenormalize table down to a usable ratio that I can apply to a variable canvas size (800x600, 300x300, etc).

As a more specific question: Question What is the best method you (or anyone) has found to get these large numbers into a usable ratio/normalized number?

Thanks!

Benign Sage

Benign Sage
Posted - 2011.04.06 16:45:00 - [4]
 

Edited by: Benign Sage on 06/04/2011 17:57:24
Edited by: Benign Sage on 06/04/2011 16:47:31
I believe I am getting a bit closer to normalizing the data. I started over, took another look at the database tables and here is what I have going:

Objective:
Plot all solar systems for given region (Heimatar) (link the jumps later)
Procedure:
Query the database...
SELECT
mapDenormalize.x,
mapDenormalize.z,
mapRegions.xMin,
mapRegions.xMax,
mapRegions.zMin,
mapRegions.zMax
FROM
mapDenormalize,
mapRegions
WHERE
mapDenormalize.typeID='5'
&& mapDenormalize.regionID = '10000030'
&& mapRegions.regionID = mapDenormalize.regionID


Loop through the data, calculate normalized values (0 to .5) using following formula(s) (I believe my problem may be here):

$normMin=0;
$normMax=.5;


(you might be like, "why the hell did you choose those numbers?" my answer: after playing around I found that these gave me a better image)

$normX=$normMin+($solarsystem['x']-$solarsystem['xMin'])*(($normMax-$normMin)/($solarsystem['xMax']-$solarsystem['xMin']));

$normY=$normMin+($solarsystem['z']-$solarsystem['zMin'])*(($normMax-$normMin)/($solarsystem['zMax']-$solarsystem['zMin']));

Finally, I multiply the normalized values by the length and width of the image respectively.

$xcoord=($normX)*$width;
$ycoord=($normY)*$height;


Below is an example of what I am seeing now. I feel like the solution is close, just one small piece remaining...

Please visit your user settings to re-enable images.

Any mathematicians out there you can chime in too! Any help is greatly appreciated everyone! Thanks for your patience!

Benign Sage

Celebrain
1st Steps Academy
Fidelas Constans
Posted - 2011.04.07 06:36:00 - [5]
 

Originally by: Benign Sage

As a more specific question: Question What is the best method you (or anyone) has found to get these large numbers into a usable ratio/normalized number?



I think you could be asking me how to do simple ratio algebra to convert x/z solar system coordinates into a flattened x/y pixel image maybe? This is where high school algebra comes in handy! Basic ratio is:

a/b = c/d

when you know only 3 of them, you solve for the other like:

c*b/a = d

you can use this to shrink eve interstellar distances into pixel distances on your map image. As I said in my earlier post, you need to be fairly good at math to do a map well.

Benign Sage
Posted - 2011.04.07 14:12:00 - [6]
 

Edited by: Benign Sage on 07/04/2011 14:45:20
Celebrain,

I believe the wording of my questions haven't been that satisfactory, I apologize. After looking through my numbers last night I believe I was able to successfully normalize the data (statistical mathematics, probably could should taken that in high school Rolling Eyes). I was looking at the numbers today and it finally clicked in my head of how to accomplish what I needed. Below is the procedure:

1. Query database for list of coordinates (X,Z), min(X,Z), and max(X,Z) values
2. Loop through coordinates and apply normalization as per the following:

$normMin=-1;
$normMax=1;


$normX=$normMin+($solarsystem['x']-$solarsystem['xMin'])*(($normMax-$normMin)/($solarsystem['xMax']-$solarsystem['xMin']));

$normY=$normMin+($solarsystem['z']-$solarsystem['zMin'])*(($normMax-$normMin)/($solarsystem['zMax']-$solarsystem['zMin']));

3. Whilst looping find the largest value for X and Y (use absolute value, this is going to help automatically adjust to fit all stars on canvas), and throw coordinates into an array

4. Calculate the adjustment using the following:

$adjustX=($largeX)*(($width)/2)+($width/2);
$adjustY=($largeY)*(($height)/2)+($height/2);

if ($adjustX>$width)
{
$adjustX=$adjustX-$width;
}

if ($adjustY>$height)
{
$adjustY=$adjustY-$height;
}

if ($adjustX>$adjustY)
{
$adjustment=$adjustX*2;
}
else
{
$adjustment=$adjustY*2;
}


5. Loop through the coordinate array, apply formula to determine the plot points on the X,Y plane using the following formula:

$xcoord=($dataset[$i]['x'])*(($width-$adjustment)/2)+($width/2);
$ycoord=($dataset[$i]['y'])*(($height-$adjustment)/2)+($height/2);


6. Plot points
7. Enjoy sexy map

I of course need to test this thoroughly on all regions but at least with Heimatar I have accomplished what I needed. Below is a sample of what the plotted coordinates look like now:

Please visit your user settings to re-enable images.

Thanks for your help!

Benign Sage


 

This thread is older than 90 days and has been locked due to inactivity.


 


The new forums are live

Please adjust your bookmarks to https://forums.eveonline.com

These forums are archived and read-only