How the dust tail is modeled
Dust tail to be represented as a quadratic equation (vertex points along the curve) Then tail will be planar. Dust velocity equation will act as axis of symmetry, axisDV
1. First get quadratic equation kx**2, where k is calculated from dust ejection velocity, and magnitude from heliocentric distance (k is determined by comparing those two values of many comets, via testing)
2. Get a list of vertex points, vertexArray
3. Since that equation's axis of symmetry will be x=0, we can get the rotation to aDV, A
4. Next, get the translation to the point in space, B
5. Combine these to the final transformation matrix T(x) = B(A(x))
6. Put all points in vertexArray through T
Finding k, which represents the magnitude of the dust tail, from comparing the usual case of dust ejection velocity (which takes into account heliocentric distance) vector length.
Min dust ejection velocity vector length: 5.2853
Max DEV length: 23.2426
Usual DEV length: (10, 15)
k = DEV_length * factor // TODO: need factor? Can only determine after drawing
Still need to find projection from 3-D coordinates to 2-D window (screen).
Comet data and parse code below
Monday, June 25, 2012
Saturday, June 2, 2012
Going slow
Unfortunately, with final exams and project deadlines coming up, this will be a slow week... I'll be back in high gear 11th June. I'll actually be able to concentrate fully on SoC then since most of school will be over.
Friday, June 1, 2012
Plasma tail bugs
Update: Added glBlend(). Now color looks like plasma tail (can see stars through tail). But rendering still has problems.
Currently, the plasma tail doesn't show up. To draw a cone, I'm calculating points that depict the base of the cone (2*pi*radius), and the tip (nucleus position). Using print statements, the comet's plasmaTail() draw function is actually being passed.
A vertex array of 1 comet. Cone has 12 slices, the even-numbered slices share the same vector because it's the tip.
Comet drawing comet_i
"0testComet" 0 6.01287 -4.51122 6.28631
"0testComet" 1 83699.8 -80468.1 92593.8
"0testComet" 2 6.01287 -4.51122 6.28631
"0testComet" 3 83786.4 -80418.1 92593.8
"0testComet" 4 6.01287 -4.51122 6.28631
"0testComet" 5 83873 -80468.1 92593.8
"0testComet" 6 6.01287 -4.51122 6.28631
"0testComet" 7 83873 -80568.1 92593.8
"0testComet" 8 6.01287 -4.51122 6.28631
"0testComet" 9 83786.4 -80618.1 92593.8
"0testComet" 10 6.01287 -4.51122 6.28631
"0testComet" 11 83699.8 -80568.1 92593.8
Bug #1: drawing fake cone at wherever cursor clicks
Instead of originating from comets, the base of the "cone" is where the cursor last clicked. The cone is revolving, and is actually a square base with two sides' triangles rendered. There's only one such "cone" visible. This could be all 34 cones being drawn on top of each other. (I used print statements to verify that there were 34 unique comet vertex array sets.
Bug #2: flashing rectangle
There's a rectangle that brightens up already-white areas, such as the Sun's starlight. And it flashes. This doesn't happen when I downsize from full-screen mode.
Currently, the plasma tail doesn't show up. To draw a cone, I'm calculating points that depict the base of the cone (2*pi*radius), and the tip (nucleus position). Using print statements, the comet's plasmaTail() draw function is actually being passed.
A vertex array of 1 comet. Cone has 12 slices, the even-numbered slices share the same vector because it's the tip.
Comet drawing comet_i
"0testComet" 0 6.01287 -4.51122 6.28631
"0testComet" 1 83699.8 -80468.1 92593.8
"0testComet" 2 6.01287 -4.51122 6.28631
"0testComet" 3 83786.4 -80418.1 92593.8
"0testComet" 4 6.01287 -4.51122 6.28631
"0testComet" 5 83873 -80468.1 92593.8
"0testComet" 6 6.01287 -4.51122 6.28631
"0testComet" 7 83873 -80568.1 92593.8
"0testComet" 8 6.01287 -4.51122 6.28631
"0testComet" 9 83786.4 -80618.1 92593.8
"0testComet" 10 6.01287 -4.51122 6.28631
"0testComet" 11 83699.8 -80568.1 92593.8
Bug #1: drawing fake cone at wherever cursor clicks
Instead of originating from comets, the base of the "cone" is where the cursor last clicked. The cone is revolving, and is actually a square base with two sides' triangles rendered. There's only one such "cone" visible. This could be all 34 cones being drawn on top of each other. (I used print statements to verify that there were 34 unique comet vertex array sets.
Bug #2: flashing rectangle
There's a rectangle that brightens up already-white areas, such as the Sun's starlight. And it flashes. This doesn't happen when I downsize from full-screen mode.
Subscribe to:
Posts (Atom)