taby

Members
  • Content count

    2599
  • Joined

  • Last visited

Community Reputation

1265 Excellent

About taby

  • Rank
    Contributor
  1. Gravity systems?

    You may also want to try the Range Kutta 4 (RK4) for integration: http://gafferongames.com/game-physics/integration-basics/ RK4 is slower than Euler integration or leapfrog, but it is more precise.
  2. Does anyone here use AngularJS? If so, why?
  3. Don't forget to pad your plaintext with (pseudo-)random bytes before encryption, otherwise you're just doing a fancy Caesar cipher!!
  4. Tennis Ball Physics

    Don't forget that a tennis ball spins in the air and this causes an acceleration on top of gravitational acceleration -- they call this the Magnus effect.   The closest I found to a solution was to fire a bunch of balls in an array fashion and used the ball that hits closest to the desired location. Gradient descent was going to be my next method, but I lost interest.
  5. Generalization of Cassini ovals

    The asymmetry in figure 11 is due to different black hole masses, as seen in formula 1 on the first page: increasing the Mi mass shifts the corresponding contribution to f towards larger ri, which in this physical model corresponds to more massive black holes having larger event horizon boundaries. Render examples with less extreme M1/M2 ratios to understand better     Sounds good. Thanks for taking the time to reply :)   I figured out that it is a generalization of Cassini ovals where the torus in question is lopsided like with a ring cyclide.   Check the paper again... I uploaded a new version.
  6. I'm working on a paper that describes black hole mergers. Most of the figures resemble Cassini ovals, except for the last figure... do you know of a way to make one of the ovals larger than the other?   The paper is at http://vixra.org/abs/1701.0614   Thanks for any help that you can provide.
  7. How do i implement advection on 2d grid

    Have you checked out Jos Stam's Stable Fluids and Real-Time Fluid Dynamics for Games? There is a C code, including an advect function (in solver.c): http://www.dgp.toronto.edu/people/stam/reality/Research/zip/CDROM_GDC03.zip
  8. Merry Christmas!

    I scored a copy of Final Fantasy XV! Totally unexpected. I'm in shock.
  9. Technically you're sending data. Information is only a property of the data.
  10. Just pass your arguments as a reference to a vector<string> or vector<int> or whatever you're passing in. One function. If you need to know how to convert strings to ints, use an istringstream. Let me know if you run into trouble.   Use the command g++ filename.cpp -std=c++14 -stdlib=libc++ on Mac OS X. #include <vector> #include <string> #include <iostream> using namespace std;   void parse_vars(const vector<string> &vars) {     for(const string var : vars) cout << var << endl; }   int main(int argc, char **argv) {     vector<string> vars;          for(int i = 0; i < argc; i++)         vars.push_back(argv[i]);       parse_vars(vars);       return 0; }
  11. C++ Magazine

    One issue discussed putting a TCP/IP interface into a coffee maker, decades before the Internet of Things.
  12. C++ Magazine

    Dr. Dobbs is great.
  13. spiral physics help

    In main.cpp, replace idle_func with the following code. This implements drag: void idle_func(void) {     custom_math::vector_3 grav_dir = sun_pos - mercury_pos;     custom_math::vector_3 drag_dir = -mercury_vel;          float distance = grav_dir.length();       grav_dir.normalize();     custom_math::vector_3 accel = grav_dir*(G*sun_mass/pow(distance, 2.0));          drag_dir.normalize();     accel = accel + drag_dir*(G*sun_mass/pow(distance, 2.1));          float dt = 10000;       mercury_vel = mercury_vel + accel*dt;     mercury_pos = mercury_pos + mercury_vel*dt;          positions.push_back(mercury_pos);          glutPostRedisplay(); }
  14. spiral physics help

    Because it's six files altogether.   Edit: I uploaded the files to GitHub.   https://github.com/sjhalayka/Orbit
  15. spiral physics help

    It says "This upload failed"