thread for segments files and parameters for simulation runs
-
- Posts: 1439
- Joined: Wed Jul 14, 2010 5:27 pm
i found an explanation of the fast inverse square root algorithm. i think this is what the hardware does On a gpgpu (though i dont know how many iterations of newtons method are used):
on wikipedia
and a tutorial
notice the algorithm is commonly (but incorrecly) attributed to legendary programmer john carmack. (and if that's the first time you've heard of carmack and are asking "legendary, why?", chew on this: besides pioneering numerous state of the art 3d rendering algorithms and technologies, he recently wrote a state-of-the-art 3d-graphics engine that runs at 60 frames a second ON AN IPHONE. 'nough said.
http://www.youtube.com/watch?v=52hMWMWKAMk
on wikipedia
and a tutorial
notice the algorithm is commonly (but incorrecly) attributed to legendary programmer john carmack. (and if that's the first time you've heard of carmack and are asking "legendary, why?", chew on this: besides pioneering numerous state of the art 3d rendering algorithms and technologies, he recently wrote a state-of-the-art 3d-graphics engine that runs at 60 frames a second ON AN IPHONE. 'nough said.
http://www.youtube.com/watch?v=52hMWMWKAMk
-
- Posts: 1439
- Joined: Wed Jul 14, 2010 5:27 pm
and in fact i don't think floating point division is implemented natively on an nvidia gpu, either. i believe it's done by multiplying by the reciprocal. (reciprocal being implemented natively.)
and both reciprocal and rsqrt have 1/4 the bandwidth of a floating point multiplication. so in the code you'll see i trade a division or reciprocal for a multiplication where ever possible. little tweaks like this may be small but they add up. and i'm an optimizer at heart. when you're writing deliberately for a particular architecture (what one might call a "hard-core" programmer, pun intended) there's a lot more to writing top-notch code than just copying down some formulas. you really have to consider every aspect of the hardware, and esp. the memory architecture and instruction scheduling. this goes back to the compsci programmer vs physicist programmer debate. though i wish i were both.
and both reciprocal and rsqrt have 1/4 the bandwidth of a floating point multiplication. so in the code you'll see i trade a division or reciprocal for a multiplication where ever possible. little tweaks like this may be small but they add up. and i'm an optimizer at heart. when you're writing deliberately for a particular architecture (what one might call a "hard-core" programmer, pun intended) there's a lot more to writing top-notch code than just copying down some formulas. you really have to consider every aspect of the hardware, and esp. the memory architecture and instruction scheduling. this goes back to the compsci programmer vs physicist programmer debate. though i wish i were both.
John D. Carmack of Doom and Quake fame - legendary indeed. MIP-Meister.
Many years since I went near assembly code - GPU's weren't invented. Interesting how Clifford Algebra's have come full circle, from what I understand they lie at the heart of most good GPU's now, with lots of fast lookup tables and are increasingly being taught to science undergrads as the paradigm of choice.
Surprised not to see more exotic hardware dedicated to it earlier really.
Many years since I went near assembly code - GPU's weren't invented. Interesting how Clifford Algebra's have come full circle, from what I understand they lie at the heart of most good GPU's now, with lots of fast lookup tables and are increasingly being taught to science undergrads as the paradigm of choice.
Surprised not to see more exotic hardware dedicated to it earlier really.
For a phase-space view, couldn't you display the mag-field vector using RGB coloring of a point instead of drawing an XYZ pointing vector? You'd need a "color sphere" in the corner or something to give a reference on direction for a particular color, but it should be relatively intuitive once looked at (at least, it would be for me, so take that "intuitive" part with a decent dose of salt ).happyjack27 wrote:that would certainly be "neat", but it is much "simpler" to say than do. as for phase space projection, the easiest way would be separate x,y,and z components, but that probably wouldn't be very visually intuitive. so if i were to do that i'd lean towards the considerably more difficult vector approach. (though lines rather than arrows)rcain wrote: could magfields/Lorentz sufaces be neatly represented by simply swapping 'points' for coloured 'arrows' i wonder? else project it out as a new phase space?
Dont' forget to add Founder of Armadillo Aerospace, a major contestant in the recent X-Prize and Lunar-Lander Challenge events.rcain wrote:John D. Carmack of Doom and Quake fame - legendary indeed. MIP-Meister.
Many years since I went near assembly code - GPU's weren't invented. Interesting how Clifford Algebra's have come full circle, from what I understand they lie at the heart of most good GPU's now, with lots of fast lookup tables and are increasingly being taught to science undergrads as the paradigm of choice.
Surprised not to see more exotic hardware dedicated to it earlier really.
-
- Posts: 1439
- Joined: Wed Jul 14, 2010 5:27 pm
that's not the difficulty. drawing a line is easy enough. it's allocating the memory for the new vector space and getting it through the convoluted class heirarchy and then from cuda to opengl.krenshala wrote: For a phase-space view, couldn't you display the mag-field vector using RGB coloring of a point instead of drawing an XYZ pointing vector? You'd need a "color sphere" in the corner or something to give a reference on direction for a particular color, but it should be relatively intuitive once looked at (at least, it would be for me, so take that "intuitive" part with a decent dose of salt ).
but i have an idea. i'm thinking i might separate the acceleration accumulator vector into two separate accumulator vectors, one for lorentz force accelerating and another for coloumb force acceleration. then i can add some new force views to the phase space views: lorentz total, lorentz radial, lorentz axial, and the same for coloumb. not as informative as a vector field, but to look for a wiffleball all we're really looking for is a point outside the center where the radial lorentz force passes through zero. and that would certainly be clear with this view. and this way i won't have to pass a whole 'nother vector space to opengl or modify the rendering code.
what do they say about mathematicians? "a good mathematician is a lazy one." perhaps the same holds true for programmers.
-
- Posts: 1439
- Joined: Wed Jul 14, 2010 5:27 pm
it has 2 misconnected coil segments (had a pair of x and y coords swapped) and one coil facing the wrong way. pretty, though:rjaypeters wrote:"Inverse" WB-6 AKA Octahedron 1m central radius:
http://www.youtube.com/watch?v=mFWdva-nhEc
i fixed it though. this is at 0.15m radius, about 7 tesla. i start the plasma density low, then i push it a little.
seems to recognize the geometry, but the cusps look a more even. you can't tell if the corner of face cusps are longer. i think this would make a better wb for exactly that reason: the cusps would all plug at the same time and rate, so i think that would be more stable. uploading now.
EDIT: uploaded:
http://www.youtube.com/watch?v=UUKEUXvMmHs
Last edited by happyjack27 on Tue Dec 14, 2010 1:40 am, edited 1 time in total.
-
- Posts: 1439
- Joined: Wed Jul 14, 2010 5:27 pm
-
- Posts: 1439
- Joined: Wed Jul 14, 2010 5:27 pm
interestingly, when you remove a pair of facing coils, the plasma thinks you removed all of the other coils instead (and presumably reversed the current direction)
http://www.youtube.com/watch?v=4NhkpG8BftI
(this was from validating the inverse wb-6 configuration)
for comparison, here are the facing coils that were removed by themselves.
http://www.youtube.com/watch?v=N7QhvH2R4fw
http://www.youtube.com/watch?v=4NhkpG8BftI
(this was from validating the inverse wb-6 configuration)
for comparison, here are the facing coils that were removed by themselves.
http://www.youtube.com/watch?v=N7QhvH2R4fw
-
- Posts: 869
- Joined: Fri Aug 20, 2010 2:04 pm
- Location: Summerville SC, USA
I think this is the hanelyp you mean:
Oblique view to show octagonal character:
As you see I have a model, but I don't have a segment list. Perhaps hanelyp already has the list.
No dodecahedron model on the 1m radius.
I am perturbed by the errors I am making, I hope they don't cause too much trouble.
Oblique view to show octagonal character:
As you see I have a model, but I don't have a segment list. Perhaps hanelyp already has the list.
No dodecahedron model on the 1m radius.
I am perturbed by the errors I am making, I hope they don't cause too much trouble.
"Aqaba! By Land!" T. E. Lawrence
R. Peters
R. Peters
-
- Posts: 1439
- Joined: Wed Jul 14, 2010 5:27 pm
-
- Posts: 869
- Joined: Fri Aug 20, 2010 2:04 pm
- Location: Summerville SC, USA
You didn't ask for it, but this might give an idea of what goes on. I picked the corners of the fillets as corners of the squares listed below. IIRC, these square coils miss the 1m radius sphere by 0.113m.
Quick and dirty hanelyp octahedron:
So, complete the hanelyp octahedron or dodecahedron next?
Quick and dirty hanelyp octahedron:
Code: Select all
//Quick & Dirty hanelyp Octahedron
// coil perimeter = 7.412m
//+x, +y, +z coil - down
4
0.103, 0.103, 1.456, 1.030, 1.030, 0.146
1.030, 1.030, 0.146, 1.956, 1.956, 1.456
1.956, 1.956, 1.456, 1.030, 1.030, 2.766
1.030, 1.030, 2.766, 0.103, 0.103, 1.456
//+x, -y, +z coil - up
4
0.103, -0.103, 1.456, 1.030, -1.030, 2.766
1.030, -1.030, 2.766, 1.956, -1.956, 1.456
1.956, -1.956, 1.456, 1.030, -1.030, 0.146
1.030, -1.030, 0.146, 0.103, -0.103, 1.456
//+x coil - clockwise
4
1.133, -0.926, 0.0, 2.986, -0.926, 0.0
2.986, -0.926, 0.0, 2.986, 0.926, 0.0
2.986, 0.926, 0.0, 1.133, 0.927, 0.0
1.133, 0.927, 0.0, 1.133, -0.926, 0.0
//-y coil - counter-clockwise
4
-0.926, -1.133, 0.0, 0.927, -1.133, 0.0
0.927, -1.133, 0.0, 0.926, -2.986, 0.0
0.926, -2.986, 0.0, -0.926, -2.986, 0.0
-0.926, -2.986, 0.0, -0.926, -1.133, 0.0
//-x, -y, +z coil - down
4
-0.103, -0.103, 1.456, -1.030, -1.030, 0.146
-1.030, -1.030, 0.146, -1.956, -1.956, 1.456
-1.956, -1.956, 1.456, -1.030, -1.030, 2.766
-1.030, -1.030, 2.766, -0.103, -0.103, 1.456
//-x coil - clockwise
4
-1.133, -0.927, 0.0, -1.133, 0.926, 0.0
-1.133, 0.926, 0.0, -2.986, 0.926, 0.0
-2.986, 0.926, 0.0, -2.986, -0.926, 0.0
-2.986, -0.926, 0.0, -1.133, -0.927, 0.0
//-x, +y, +z coil - up
4
-0.103, 0.103, 1.456, -1.030, 1.030, 2.766
-1.030, 1.030, 2.766, -1.956, 1.956, 1.456
-1.956, 1.956, 1.456, -1.030, 1.030, 0.146
-1.030, 1.030, 0.146, -0.103, 0.103, 1.456
//+y coil - counter-clockwise
4
0.926, 1.133, 0.0, -0.926, 1.133, 0.0
-0.926, 1.133, 0.0, -0.926, 2.986, 0.0
-0.926, 2.986, 0.0, 0.926, 2.986, 0.0
0.926, 2.986, 0.0, 0.926, 1.133, 0.0
//+x, +y, -z coil - up
4
0.103, 0.103, -1.456, 1.030, 1.030, -0.146
1.030, 1.030, -0.146, 1.956, 1.956, -1.456
1.956, 1.956, -1.456, 1.030, 1.030, -2.766
1.030, 1.030, -2.766, 0.103, 0.103, -1.456
//+x, -y, -z coil - down
4
0.103, -0.103, -1.456, 1.030, -1.030, -2.766
1.030, -1.030, -2.766, 1.956, -1.956, -1.456
1.956, -1.956, -1.456, 1.030, -1.030, -0.146
1.030, -1.030, -0.146, 0.103, -0.103, -1.456
//-x, -y, -z coil - up
4
-0.103, -0.103, -1.456, -1.030, -1.030, -0.146
-1.030, -1.030, -0.146, -1.956, -1.956, -1.456
-1.956, -1.956, -1.456, -1.030, -1.030, -2.766
-1.030, -1.030, -2.766, -0.103, -0.103, -1.456
//-x, +y, -z coil - down
4
-0.103, 0.103, -1.456, -1.030, 1.030, -2.766
-1.030, 1.030, -2.766, -1.956, 1.956, -1.456
-1.956, 1.956, -1.456, -1.030, 1.030, -0.146
-1.030, 1.030, -0.146, -0.103, 0.103, -1.456
"Aqaba! By Land!" T. E. Lawrence
R. Peters
R. Peters