View Single Post
  #23  
Old March 13th, 2007, 05:20 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: FQM Quadrant Shapes

Ok, for the "flower/web" type setup, it can be made decent-looking at smaller sizes. However, for the "spindly" type (the last image, where each arm is totally separate), there is not much to be done to make it appear good at lower system numbers. They tend to work out ok at medium map sizes though.

Keep in mind that the "arms" are essentially an artifact of the parameters fed to the logarithmic spiral function and how SE5 tends to place WP lines. If you look back at the very first image, you can see how there are in fact 4 separate spiral lines coming out of the center of the map. The latter quadrant images do not have WP line connections that are in any way related to the actual spirals; the WP line "arms" are actually cross-cutting through the spiral lines.




This is essentially how the locations are calculated (in python), with the uniqueness and outside-the-map checking coming after the calculations:

Code:

# first attempt, where spirals get connected as WP lines
param_first = {'a': 2,
'b': 0.1,
'c': math.pi / 8,
'phase_list': [0, math.pi / 2, math.pi, 3 * math.pi / 2]
}

# Flower/web type
param_flower = {'a': 1,
'b': 0.1,
'c': 1,
'phase_list': [0, math.pi / 2, math.pi, 3 * math.pi / 2]
}

# discrete spindly arms
param_spindly = {'a': 1.85,
'b': 0.1,
'c': 1,
'phase_list': [0, math.pi / 2, math.pi, 3 * math.pi / 2]
}

param = param_flower

# Make the difference between t0 and t1 decrease as t gets larger
t_vals = [3]
for j in range(1, 50):
t_vals.append(t_vals[j-1] + (100 - t_vals[j-1]) * 0.01)

for phase in param['phase_list']:
for t in t_vals:
t0 = t
t1 = t * param['c']

x = round(param['a'] * math.exp(param['b'] * t0) * math.cos(t1 + phase) +
map_center['x'])
y = round(param['a'] * math.exp(param['b'] * t0) * math.sin(t1 + phase) +
map_center['y'])

__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote