18
\$\begingroup\$

pigeon being thrown bread crumbs: "aww yiss, motha flippin mathjax!!"

MathJax has been enabled on our site!

That means we can have actual fancy mathematical equations expressed as such without resorting to pseudocode, uneditable \$\LaTeX\$ screenshots, etc. MathJax is derived from LaTeX, but not exactly equal to it. (It's generally off topic on TeX Stack Exchange.)

What's this do?

Basically, we can fancify our equations:

$$ E = mc^2 $$

We can wrap our equations in \$ ... \$ (for an inline equation: \$c^2 = a^2 + b^2\$), or if we want it to take up its own lines or be multiline we can use the $$ ... $$ delimiters instead.

This also lets us write equations with some significant visual complexity:

$$ \begin{align} \vec{v} &= \begin{pmatrix} x \\ y \\ z \end{pmatrix} \\ \vert{\vec{v}}\vert &= \sqrt{x^2 + y^2 + z^2} \end{align} $$

The rule of thumb is that LaTeX makes extremely complex stuff simple, and extremely simple stuff complex. :)

References are available here:

\$\endgroup\$
1

1 Answer 1

10
\$\begingroup\$

The MathJax todo list

We have a list of posts we previously identified as being solid candidates for MathJax. We should do some editing to convert those to use mathematical formulae.

Please work on the ones you can confidently work on as necessary. Once you've edited a post, delete it from this list.

Some posts that are logged here will not need MathJax at all. They are here because when compiling the case for adding MathJax to the site, we (or I) believed that if we had MathJax when the post was written then it may have been written differently to use it. However, the post having been written now may be OK as-is and not need changes. If you encounter one of these posts in this list please remove it even without edits.

What do we change or not change?

  • If a post is displaying complex mathematical equations or notation that would benefit from being laid out in MathJax instead, convert those equations to MathJax.
  • If a post is displaying minimal simple math (e.g. "a = 1 + 2") it's not really worth converting to MathJax.
  • Do not replace pseudocode with Mathjax. Pseudocode is intended to be easily translated into actual computer code, sometimes even copy-pasted with minimal adjustments. Replacing it with MathJax would be a detriment to our site's utility.
  • Do augment pseudocode with adjacent MathJax, when the mathematical notation would help people understand what's going on in the pseudocode. There are many equations that are simple to express as an equation, but complex and difficult to read when expressed as code. If it's not one of these cases (the mathematical equation is either more difficult to read than the code, or adds no net benefit in legibility) probably don't worry about this.

Sometimes the line between points 1 and 3 will be blurry. Use your judgement or request feedback from your peers in game development chat.

For users whose edits need review

If you don't have the >2k edit privilege then when you submit an edit, please leave a comment in the Edit Summary field before submitting so that whoever approves your edit can also update this page accordingly.

The "definite" list

These posts were identified as definitely beneficial from mathjax, because they were already using plaintext or images for equations or would otherwise clearly benefit from mathjax. Where these posts contain pseudocode, be mindful of whether it should be replaced with mathjax or augmented with it, per our guidance above.

  1. How do I detect the direction of 2D rectangular object collisions?

  2. Path following with Asteroids-like movement. Time to complete path ( potentially — or user could've preferred keeping the latex markup intact in the diagrams anyway)

  3. How To Program a fully controllable spring (Damped) motion

  4. Calculate intersect point / aim point

  5. Calculate intersect point / aim point

The "probably" list

These posts were identified as potentially strongly benefitting from mathjax, but may not be simple to convert: these were answers using psuedocode that may be more cleanly expressed as a mathematical equation, or would be better accompanied by an equation.

If you don't feel like a post on this list should be modified, please strike it out with <s> ... </s> rather than remove it.

  1. View Matrix FINDING U
  2. How can I move and rotate an object in an “infinity” or “figure 8” trajectory?
  3. How can I move an object in an "infinity" or "figure 8" trajectory?
  4. Converting Euler rotation angles from Z up to Y up (Max to OpenGL)
  5. Problem with Rotating Third Person Radar UE4
  6. How can I project a vector on another vector?
  7. What is Vector Projection and what is it's use in games? (but may be better leaving mathjax inside the diagram)
  8. How to work out the height of a point on a tilted surface?
  9. Hemisphere Projection
  10. Determine the z coordinate of a deformed plane based on uv (xy) coordinates
  11. Computing chance of winning when dealing with fuzzy numbers
  12. Computing chance of winning when dealing with fuzzy numbers
  13. Computing chance of winning when dealing with fuzzy numbers
  14. Computing chance of winning when dealing with fuzzy numbers
  15. Time series for creating new events in a PVP game
  16. how to handle the virtual Z axis in 2D games?
  17. How can I prevent small numerical advantages from dominating the balance of an encounter? (benefits from arrays)
  18. Translation Matrix not working properly
  19. How to convert -1 to 1 coordinate back to screen coordinates?
  20. What is a simple algorithm for calculating evenly distributed points on an ellipse?
  21. How to calculate the exit speed of ball bouncing off a solid surface
  22. Ray Intersecting Plane Formula in C++/DirectX
  23. Rotate vector by matrix?
  24. How can I find a point on a line when I have only two other points?
  25. Calculate matrix transformation components separately
  26. How to calculate distance of travel needed get achieve speed x?
  27. How to calculate distance of travel needed get achieve speed x?
  28. Attack vs Defence and who is the winner?
  29. Continuous weighted random distribution, biased toward one end
  30. understanding spatial hash function behaviour and Knuth for int64 (would benefit from align)
  31. How do idle games handle such large numbers?
  32. How can I launch a GameObject at a target if I am given everything except for its launch angle?
  33. Test if Jump can reach target
  34. Object orbiting a 3d sphere
  35. Finding pitch/yaw values from lookat vector
  36. Orbital mechanics: orbit as a function of time. Universal variable formulation?
  37. calculating the weights for direction vectors to a target
  38. Adjust Aim Angle for Motion with Accelerating Bullet
  39. How to draw a circle that is around an object and becomes smaller if the player enters it
  40. How to draw a circle that is around an object and becomes smaller if the player enters it
  41. Returning a List of coords for a sphere in order of inside to outside
  42. Explanation of the parameters in the line intersection code
  43. How can I calculate current level from total XP, when each level requires proportionally more XP? (so many equations)
  44. How can I calculate current level from total XP, when each level requires proportionally more XP?
  45. Algorithm for spending x points on y things divided by n people
  46. Exponential EXP Curve | FIXED TIME -> MAX LEVEL
  47. Get all points of a parabola (everything except the code example at the end is formulae)
  48. Calculating the vector to catch a falling object
  49. Find two points in a point cloud with the maximum distance?
  50. Find two points in a point cloud with the maximum distance?
  51. Hex axial coordinates to table coordinates conversion (would benefit from array)
  52. How to work out given two coordinates should I use a vertical/horizontal/diagonal line to connect them
  53. Collision detection with curves
  54. How do you calculate if a line is facing a curve?
  55. How do you calculate the nearest point on 2 curves?
  56. Bezier curve arc length
  57. Moving ships between two planets along a bezier, missing some equations for acceleration
  58. Bezier curve not drawn correctly
  59. Collision detection with curves
  60. Cubic bezier for easing?
  61. Average for damage formula (Min-Max Attack - Min-Max Defense)
  62. Calculate the slope of a 3D triangle?
  63. Calculation correct position of object after collision (2d)
  64. How to find the point on a hypotenuse divinging triangle into two right triangles?
  65. Finding coordinate in radius (pseudocode)
  66. Calculating orbital elements from Cartesian Vectors
  67. Non equi-probable random function
  68. Cannot find bug in frustum culling code (lots of plaintext vector definitions that would be presented far more legibly in mathjax)
  69. Detect if two objects are going to collide (equations would benefit from being legibly expressed in mathjax alongside psuedocode)
  70. Rotating a 3rd person camera toward a target
  71. Need some help with math steering behavior stopping on destination point
  72. Is there a quick way to determine if a vector is in a quadrant?
  73. How to invert a damage formula? (maybe)
  74. atan2 : inversed result? (angle 180 is on the right side, angle 0 on the left side)
  75. How can I make a spline out of three points that define a circular arc?
  76. Inline-Building a World (SRT) Matrix (maybe)
  77. Determine if Plane is seen by Camera
  78. Understanding normal mapping
  79. Understanding normal mapping
  80. Affine transformation: rotate a plane parallel to another plane
  81. What is the simplest way to calculate distance in a 3D environment? (provides native formula + implementation pseudocode already; native formula would be better off as mathjax)
  82. How to reposition a bouncing ball after it has passed through a surface
  83. How can I test whether points are within a polygon?
  84. How to calculate a direction vector for camera? (probably)
  85. Trajectory of a spinning ball
  86. How do I interpret the dot product of non-normalized vectors?
  87. How can I come up with a simple diminishing return equation?
  88. How can I come up with a simple diminishing return equation?
  89. How can I come up with a simple diminishing return equation?
  90. Formula to measure uv-mapping distortion (would benefit from align)
  91. Gravity: Slow down on ground approach
  92. Percentage of object inside a moving rect
  93. Percentage of object inside a moving rect
  94. How do I calculate the distance between a point and a rotated rectangle? (real code; would benefit from being annotated with mathjax as the operation is fairly simple)
  95. Implicit Functions and extracting an isosurface
  96. Explaining vector math for a pendulum camera
  97. Converting time of day into a smooth day/night variable?
  98. Screen coordinates to isometric coordinates? (maybe)
  99. How do I generate solar systems for a 2d universe map, but still look random
  100. RPG like hit points growth algorithms help
  101. Determining a sensible gear-like hierarchy for a series of connected objects
  102. How to use "weighted average easing" correctly with variable framerate?
  103. How do I convert from the global coordinate space to a local space?
  104. How do I convert from the global coordinate space to a local space?
  105. How can I find the tangent and normal at an interpolated point on a Catmull-Rom/Hermite spline?
  106. Predicted target location (real code, ought to be accompanied by MathJax)
  107. Using Bullet physics engine to find the moment of object contact before penetration
  108. Why do we use the Pythagorean theorem in game physics?
  109. Projecting a light onto a quad (apparent math pseudocode at the beginning is hard to understand)
  110. How can I rotate about an arbitrary point in 3D (instead of the origin)?
\$\endgroup\$
3
  • \$\begingroup\$ We should find a way to tell converted posts apart from the ones that are not, so that this can also become a way to track which ones are done and which are not (ex. make the ones that are done italic, or make the ones that are not done bold, I tried using ascii striket̶h̶r̶o̶u̶g̶h̶ but that just breaks the notation we use to make the post shorter.) \$\endgroup\$ Dec 21, 2017 at 7:18
  • 1
    \$\begingroup\$ @John The "done" posts ought to get deleted off the list by the people completing them; if the edit needs review others can also keep an eye on it if it's posted to the linked chat room. \$\endgroup\$ Dec 21, 2017 at 9:00
  • \$\begingroup\$ Might be worthwhile to check the list produced by this search about images hosted on Wikipedia. \$\endgroup\$
    – Vaillancourt Mod
    Aug 22, 2018 at 1:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .