Saturday, May 26, 2012

pushed cometTailDirFunctions

Pushed branch */cometTailDirFunctions

Functions added to Comet class:

Vec3d plasmaTailDirection();
- anti-sunward direction, radially off by 3 degrees

Vec3d velocityOfComet();
- tangent to comet's orbit; current velocity direction
- for dust tail (which curves with orbit)

Vec3d dustEjectionVelocity();
- for dust tail's anti-sunward direction vector
- to be used with velocityOfComet() to get final dust tail direction

float tailLength();
- Length of dust and plasma tails (equation does not distinguish)

void plasmaTail();
- to draw plasma tail
- note: not working yet. Need to figure out how to make it display on Stellarium and which function in Planet's draw function to put in.

void drawComet();
- virtual function in Planet
- to draw the comet tails in addition to what Planet does

Sunday, May 20, 2012

Comet Class functions

Functions that currently exist:
Comet(), ~Comet(), getInfoString(), getVMagnitude(), setAbsoluteMagnitudeAndSlope()

Plan for the next 7 weeks:

= = = Comet.cpp = for comet representation

- for getting plasma tail and dust tail directions
- dust tail direction calculation will be indirect (sum with comet's velocity vector)

- Calculate via physical equation
- GL Blend to create fade away effect and since tails are quite translucent

- Rate of flow equations/ heliocentric distance for size of tail
- A parabola in a plane
- Calculate solar color? Or just 1 solar color
- uses dustTailDensity() and effectiveJetDirection()

seeDustTail() // observer's view of tail
- according to angle (i.e. head-on: fan; side-on: line)
- parallax for antitail
- bool dead or alive (by heliocentric distance)

- magnitude according to heliocentric distance
- shape more elliptical as it gets closer
- GL Blend(one, one) with dust tail

- cone // if not efficient enough, then use parabola
- streaky blue texture bind
- GL Blend for fading to let most of the stars behind it visible
- GL Blend to let dust tail take precedence
- length by heliocentric distance
- offset angle by 3 degrees
- bool dead or alive (by heliocentric distance)


// same function as in StelSkyDrawer.cpp, but customized for comet since not Planet
- mip maps? Far away, comet looks like blurry oval. Near, level of detail is much higher
- transform with respect to viewer

- Some angle ~45 degrees
- antiSunDirection() + velocityOfComet()

// not actual velocity, just easier to think about it like this for calculating effectiveJetDirection()
- tangent to orbit path, a.k.a. velocity of comet (parallel to orbit's tangent)


= = = Sky Tab

- since bursts are random and nigh unpredictable, the viewer can control this. With a comet selected, adjusting a slider in Sky Tab will increase (a.k.a make more negative) the magnitude

= = = Misc.

Could potentially have a Tail class, since there is overlapping direction, blend, texture bind and heliocentric distance considerations. Then the functions ionTail(), dustTail() and dustTailDensity() would instead be:

- texture()
- blendWithSky()
- blendTails()

DustTail(): public Tail
- parabola body (deformation and axis determined using effectiveJetDirection)
- dustTailDensity()
- texture bind to parabola
- size() // by rate of flow equations and heliocentric distance

IonTail(): public Tail
- cone body (axis determined using antiSunDirection)
- texture bind of blue streams/streaks to cone
- size() // a.k.a. length by heliocentric distance

Saturday, May 12, 2012

5 Papers and others

(1) 0704.22532v1.pdf - A survey of debris trails from short-period comets. Reach, Kelley, Sykes
Mean anomaly (parameter relating position and time via Kepler's Law of sweeping out areas at equal rates)

Note: Beta is the ratio of radiation pressure to gravity (1 means they are equal) in terms of acceleration/force.
E.g. (from paper 2) Comet P/2005 U1 Read - particle size: 10-100 micro m, terminal ejection v = (0.2 -3) m/s, escape velocity = 0.2 m/s

(2) 0x810.1351v1.pdf - Physical Properties of Main-Belt Comet P/2005 U1 (Read). Hsieh, Jewitt, Ishiguro
Terminal velocity of particles ejected (then form tails). Jets are modeled like cones, with constant angles = 45 degrees. Reference ejection velocity = 24 m/s

After impact with another body, the particle ejaculation comes mainly from that side of the comet.

(3) 1105.0944v1.pdf Physical Properties of Main-Belt Comet 176P/LINEAR. Hsieh, Ishiguro, Lacerda, Jewitt

Comas can be modeled as ellipsoides, with c/a == b/a for simplicity. 0 < c/a < b/a < 1. Dust tail is assumed to be a jet-driven cone, with cone opening angle of 45 degrees, and its central axis points toward right ascension, and declination in the inertial frame. If rotation, the angle can be approximated about the axis. Assume that dust particles are released uniformly from a sphere and that emission occurs only from direct sunlight. Comet's obliquity can lead to significantly active dust ejection during "summer" time.

Tail size affected by amount of volatile ice in comet. Maybe some variable initially optionally manually hard-coded in ssystem.ini. Later implement in UI adjustable by slider? This would be a hopeful deliverable depending on how long it takes to model the tails and coma correctly.

(4) 1961ApJ./../.pdf On the study of comet tails and models of the interplanetary medium. Brandt

Getting the tail direction:

(5) 1968Apj./../.pdf Theory of dust comets. I. Model and equations. Finson, Probstein

Distinctive comet phenomena becomes visible at 1AU from the Sun. 10**5- 10**6 km is typical coma diameter. Light intensity decreases 1/r

Plasma tails are long (10**7-10**8)km and narrow (10**5-10**6), straight, lagging in the radial direction by 3-5 degrees. Solar wind = 500 km/s. Comet velocity tangent to orbit = 30-60 km/s.
Dust tails are shorter (10**7)km and broader and curved, lagging between the extended radius vector of the Sun and the orbit path. EM interaction on dust tails are negligible.

The presence or absence of tails can affect the tails' orientation. Comets some times only have 1 type of tail. When both are present, the ion tail can charge and affect the dust tail because of its high speed 10km/s.

More: Appendix B (pg24, 25) determines how the comet looks like to an observer on Earth by relating an vector to a point on the tail axis. This way, parallax error for the antitail can be determined.

Update (5/24/12)

Length of comet tail (From ProjectPluto)

The formula gives the tail length L, in millions of kilometers, as follows:
mhelio = H + K * log10(r)
log10(Lo) = -0.0075*mhelio2 - 0.19*mhelio + 2.10
L = Lo * (1 - 10-4r) * (1 - 10-2r)
where H and K are the usual magnitude parameters, and r is the comets' distance from the Sun in AU.

Drawbacks of formula:

- it does not distinguish between ion and dust tails
- it does not take into account the continuing heating for some
  time after perihelion, which results in a longer tail after
  perihelion than before for a given solar distance on average.
  Such an improvement, however, is on my project list...
  This shortcoming, however, can be partially compensated by using
  two different sets of brightness parameters, which many comets
  with q < 1 AU actually show (pre- and postperihelion).
- not a consequence of the formula but equally important:
  the assumption of a tail directed exactly in the anti-solar
  direction can affect the apparent tail length in a recognizable
  way in the case of deviating or bended (dust) tails.

Wednesday, May 9, 2012

Coma no halo

I put a fake comet for testing in Stellarium with these values:

parent = Sun
orbit_Inclination = 40
coord_func = comet_orbit
orbit_Eccentricity = 0.432778
orbit_ArgOfPericenter = 117.8131
absolute_magnitude = -50
name = 0testComet
slope_parameter = 4
lighting = false
tex_map = nomap.png
color = 1.0, 1.0, 1.0
orbit_AscendingNode = 207.8674
albedo = 1
radius = 5
orbit_PericenterDistance = 10
type = comet
orbit_TimeAtPericenter = 2456447.93229167

It showed up on Stellarium like this:
So there was the textures/halo.png. Normally it is only visible as a dot[1]. But putting tex_halo = NULL in ssystem.ini didn't help.

[1]At absolute_magnitude = -10, it looked like how it usually does:

There shouldn't be a halo even when the comet is large.

Tracking it down to StelSkyDrawer.cpp/postDrawSky3dModel():
   for each(Planet &p, systemPlanets)

    core -> getSkyDrawer()-> postDrawSky3dModel(); // last line

Added the following public member functions to Planet:
void setIsComet(bool is);
bool getIsComet(); // returns true
And the member variable bool isComet, which by default is false, until set to true in SolarSystem.cpp when comet object is initialized.

Then, in postDrawSky3dModel(), halo is skipped if the object is a comet. So now 0testComet only shows up as a fuzzy ball of light. Still, at this magnitude it should have tails and the coma shouldn't be spherical.

Update: knowing whether or not planet is comet throughout the rest of the code could be useful since the way draw() will work should be different.

Update 2: To draw comet,
(1) postDrawSky3dModelComet(), or
(2) a drawing laid on top of postDrawSky3dModel()

    if Comet,
    core -> getSkyDrawer()-> postDrawSky3dModel(); // last line
(3) a comet exclusive function

    if Comet,
          core -> getSkyDrawer()-> postDrawSky3dModel(); // last line

Probably shouldn't completely separate Comet class from Solar System or Planet parent class.

Wednesday, May 2, 2012

Pushing 1st branch

Added 34 comets to ssystem.ini and pushed branch testA to lp.

From aerith's weekly comet page, I picked the comets that could be seen in good condition and had < 15 magnitude, or better magnitude, and that were also going to be visible in the future. I also checked out JPL Horizons and got comets from several observable locations, although all of those comets were available in the MPC. From MPC, I picked some older comets that would return to observation 2013-2014, and all the comets discovered in 2012, as well as some more recent comets. All in all, I just used the SolarSystemEditor (SSE) plugin to add comets to ssystem.ini because I didn't have a need for manual adding. Then I just replaced the branch's data/ssystem.ini with ~/Library/Application\ Support/Stellarium/data/ssystem.ini. So... nothing much other than just pushing a branch to lp.

List of comets added: