org.gjt.universe.accrete
Class DustBand

java.lang.Object
  |
  +--org.gjt.universe.accrete.DustBand

public class DustBand
extends java.lang.Object

DustBands represent sections of the protoplanetary disc which contain gas and/or dust to be accreted.

Copyright information

This Java class is copyright 1998 by Carl Burke. All rights reserved. Substantial sections of this code were previously distributed in different form as part of 'starform' (copyright 1989 Matthew Burdick)

This software is provided absolutely free and without warranty, including but not limited to the implied warranties of merchantability and fitness for a purpose. You may use this code for any legal purpose provided that you do not charge for it; this implies that you may use this code as a component of a commercial system as long as the additional functionality of the commercial system is greater than what this code provides and that the commercial system is not primarily intended as a simulation of solar system formation. In other words, if you want to write a science-fiction computer game that uses the code in this package to build objects which are used in the game, that's great and permitted; if you use this code to make a kickass solar-system-builder, you are not allowed to distribute that software except for free.

You are allowed and encouraged to modify this software, provided that this copyright notice remains intact. This notice may be reformatted, but not removed.

If you do use this software, I and the contributing authors listed under "Acknowledgements" would appreciate some recognition. If you make changes, I would appreciate it if you would pass those changes back to me for possible inclusion in the master. At the time this notice was prepared, my email address is cburke@mitre.org and the home page for this software is http://www.geocities.com/Area51/6902/w_accr.html.

Acknowledgements

Matt Burdick, the author of 'starform' (freeware copyright 1989); much of the code (particularly planetary environments) was adapted from this.

Andrew Folkins, the author of 'accretion' (public domain) for the Amiga; I used chunks of his code when creating my displays.

Ed Taychert of Irony Games, for the algorithm he uses to classify terrestrial planets in his tabular CGI implementation of 'starform'.

Paul Schlyter, who provided information about computing planetary positions.


Field Summary
static int DBI_CONTAINED
           
static int DBI_INNER_OK
           
static int DBI_NO_INTERSECTION
           
static int DBI_OUTER_OK
           
 boolean dust_present
           
 boolean gas_present
           
 double inner_edge
           
 DustBand next_band
           
 double outer_edge
           
 
Constructor Summary
DustBand(double inner_limit_of_dust, double outer_limit_of_dust)
          Public constructor.
DustBand(DustBand db)
          Copy constructor.
 
Method Summary
 double collect_dust(double r_inner, double r_outer, Protoplanet p)
          Calculate the amount of dust which the specified protoplanet can accrete from this dust band, if any.
 int intersect(double inner, double outer)
          Calculates the intersection of this dust band with a range of distances and returns a mask constructed from the DBI_xxx flags exported by this class.
 boolean isCompatibleWith(DustBand db)
          Compares two dust bands for compatibility.
 boolean mergeNext()
          Merge a dust band with its successor, allowing the successor to be garbage collected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DBI_NO_INTERSECTION

public static final int DBI_NO_INTERSECTION
See Also:
Constant Field Values

DBI_INNER_OK

public static final int DBI_INNER_OK
See Also:
Constant Field Values

DBI_OUTER_OK

public static final int DBI_OUTER_OK
See Also:
Constant Field Values

DBI_CONTAINED

public static final int DBI_CONTAINED
See Also:
Constant Field Values

inner_edge

public double inner_edge

outer_edge

public double outer_edge

dust_present

public boolean dust_present

gas_present

public boolean gas_present

next_band

public DustBand next_band
Constructor Detail

DustBand

public DustBand(double inner_limit_of_dust,
                double outer_limit_of_dust)
Public constructor.

Parameters:
inner_limit_of_dust - Inner edge of the dust band (in AU)
outer_limit_of_dust - Outer edge of the dust band (in AU)

DustBand

public DustBand(DustBand db)
Copy constructor.

Parameters:
db - Parent DustBand from which to extract values.
Method Detail

intersect

public int intersect(double inner,
                     double outer)
Calculates the intersection of this dust band with a range of distances and returns a mask constructed from the DBI_xxx flags exported by this class. Typically used to identify bands which overlap the effect radius of a protoplanet.

Parameters:
inner - Inner edge of the intersecting band (in AU)
outer - Outer edge of the intersecting band (in AU)

isCompatibleWith

public boolean isCompatibleWith(DustBand db)
Compares two dust bands for compatibility.

Parameters:
db - DustBand to be compared to this one.

mergeNext

public boolean mergeNext()
Merge a dust band with its successor, allowing the successor to be garbage collected.


collect_dust

public double collect_dust(double r_inner,
                           double r_outer,
                           Protoplanet p)
Calculate the amount of dust which the specified protoplanet can accrete from this dust band, if any.



Copyright © 2001 Universe Dev Team All Rights Reserved.