• Welcome to the new COTI server. We've moved the Citizens to a new server. Please let us know in the COTI Website issue forum if you find any problems.
  • We, the systems administration staff, apologize for this unexpected outage of the boards. We have resolved the root cause of the problem and there should be no further disruptions.

Ring/Ray fix

robject

SOC-14 10K
Admin Award
Marquis
Warning: Piddly Topic Alert.

OK, I know nobody uses it, but the Ring/Ray system explained in Classic Traveller is nice, if only because it is not sector-based. Sector boundaries don't exist when using Ring/Ray, and that can provide a fresh view of stellar data at times, and in some cases makes software programs a little cleaner -- with no boundaries to check, the distance formula is more generally useful and requires less code to implement.

For those who don't know, Ring/Ray is a way of labelling hexes based on (1) the number of parsecs (Ring) from the galactic center and (2) an 'east-west' offset calculated from the Ray passing through Capital (= Sylea). Ray corresponds to the hex column, and Ring corresponds to the hex row.

ANYWAY, I would like to propose a fix to the Ring/Ray system. The rules state that Ray 0 passes through Capital. I don't like this, for one (and only one) reason: it forces a different distance formula than the one which uses hex locations.

This is because Capital is located on an odd column. The distance formula assumes odd-even hex coords follow the standard hex numbering scheme. So each formula has slightly different constants from the other. It's painful to see.

I haven't explained myself well, so here's the actual distance formulae. You can see how nearly exact they are, but are still different. And maybe you can see why I would rather redefine Ring/Ray so that only one formula is necessary.

</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> //
// Ring is row, Ray is column
// Generic-style code for easy translation.
//
function distance( $ring1, $ray1, $ring2, $ray2 )
{
$a1 = ($ring1 + (int)(0.5+$ray1/2));
$a2 = ($ring2 + (int)(0.5+$ray2/2));

$d1 = abs( $a1 - $a2 );
$d2 = abs( $ray1 - $ray2 );
$d3 = abs( ($a1 - $ray1) - ( $a2 - $ray2 ) );

if ( ($d1 >= $d2) and ($d1 >= $d3) ) return $d1;
if ( ($d2 >= $d1) and ($d2 >= $d3) ) return $d2;
return $d3;
}</pre>[/QUOTE]</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> //
// Distance between hexes.
// Generic-style code for easy translation.
//
function distance( $col1, $row1, $col2, $row2 )
{
$a1 = ($row1 + int($col1/2));
$a2 = ($row2 + int($col2/2));

$d1 = abs( $a1 - $a2 );
$d2 = abs( $col1 - $col2 );
$d3 = abs( ($a1 - $col1) - ( $a2 - $col2 ) );

if ( ($d1 >= $d2) and ($d1 >= $d3) ) return $d1;
if ( ($d2 >= $d1) and ($d2 >= $d3) ) return $d2;
return $d3;
}</pre>[/QUOTE]My suggestion would be to assign Ray 1 to Capital, and not have a Ray Zero at all.

See, I told you this was a piddly topic!
 
Back
Top