Recent content by Jheriko

  1. J

    I There must be a center of the universe...?

    with all due respect i believe you are too quick to shoot these things down and that you haven't paid close attention to the detail of what i said. at the risk of coming off with a similar poor tone to these comments, allow me to explain in more detail so that it is not so easy to make the...
  2. J

    I There must be a center of the universe...?

    This is a bold claim. Is there an example for this that you can give or a proof of some kind? I guess it depends on what centre and finite both mean too - both are ill defined term in the layman's sense. I tend to think centre means "centre of mass if this shape was filled evenly with some...
  3. J

    Simulating Saturn's rings in python

    i would suggest a simpler problem. given that you have made n-body simulation for this, how about showing the effects a third body has on an otherwise perfectly periodic two body system? if you want to get some starting data for actual bodies in the solar system there is the JPL horizons...
  4. J

    C++ program help

    "using pointers" is vague, also there is a seperate programming forum... if you have a list of length n and some pointer p to the start of that list, of the correct type then: type sum(type* p, int n) { type sum = 0; for(int i = 0; i < n; i++) sum += p[i]; return sum; } is a function...
  5. J

    Swapping 3 integers in C program

    you can do this more efficiently and without rounding errors by using ^ to the same effect a ^= b ^ c; b ^= b ^ c; c ^= b ^ c; a ^= b ^ c; swap the variable names to change the swapping that is performed, you can extend this to n variables afaik... this works because ^...
  6. J

    Speeding up particle simulation

    don't forget to optimise the code as well as the algorithm, this way you can squeeze the most out of which ever algorithm you choose (algorithmic optimisation is more important in general though) use a vector math library if possible as it might optimise to use threads and simd instruction...
  7. J

    Repeated integrals

    So for a 'hypercubic volume integral' over 0 ... 1 in m dimensions, I could do: V = \prod^{m}_{n=0} [0,1] \int_V f(x_0,x_1,x_2,\ldots,x_m) dV Thanks.
  8. J

    Repeated integrals

    Is there some notation for an iterated integral, like there is for summations and products? e.g. \overset{m}{\underset{n=0}{\raisebox{-0.07in}{\Huge{\texttt{I}}}}} f(x_0,x_1,x_2,\ldots,x_m) dx_n \overset{m}{\underset{n=0}{\raisebox{-0.07in}{\Huge{\texttt{I}}}^{b}_{a}}}...
  9. J

    Context-free grammar: derivations and ambiguity

    Some parse trees are trivial modifications of others and result in the same effect, i could imagine that in order to show that it is ambiguous you need to show two parse trees from the same source which result in different effects.
  10. J

    Registry Editing

    Also in any language which can make API calls. If you want to remove a registry key placed by a virus the best bet is to look up that virus in a virus database. Many databases have links to fixes and descriptions of exactly what a virus does.
  11. J

    Going from Procedural to OO

    This is an interesting implementation. If we were actually implementing it we might as well use int - I was just trying to illustrate the point that its easier to make a class for somethings, which is part of the motivation for OO. There are much better examples of course.
  12. J

    Source code of Games

    Lots of the functionality of C++ is recreated by hand in this code... better to just use C++ in the first place. :) Be warned that a lot of the Quake source is highly optimised... there are lots of good tricks to be learned from there though. (The fast approximate inverse square root function...
  13. J

    Going from Procedural to OO

    If you have used Visual Basic, haven't you ever wondered how to make something like "Text1" where you have a list of properties you can modify, e.g. "Text1.Left", "Text1.Caption" and functions you can call "Text1.Hide"? This was how I first picked up the ideas of OO programming. There is...
  14. J

    Python What language? is python good?

    I don't understand this, they both work using the same underlying princple of intepreting virtual instructions at run time... how can one be more flexible than the other? Perhaps Python has been implemented on some major platform that Java has not and I am just not aware of it...
  15. J

    Just wrote my first ever program! (few questions)

    Look for Psyco. It seems to be a compiler, so I guess it can produce a stand-alone .exe
Top