Schroedingers-Hat / jsphys

Libraries for physics simulation on javascript canvas
GNU Affero General Public License v3.0
11 stars 1 forks source link

Variable names #54

Open Schroedingers-Hat opened 13 years ago

Schroedingers-Hat commented 13 years ago

Should try and be systematic about variable names, so far the general system has been small x,y,z,t for coordinates, vx vy px etc for components X V P for four vectors, suffixing with 0 for the more fundamental (ie. X0 is the location of the object) View is relating to the light arriving at the origin at current time, ie. XView is where something appears to be Height/H Width/W have been used for screen height and width so far, wound up bleeding over into coordinates on the screen (rather than in spacetime). (Perhaps small letters is more consistent? Any suggestions on better names?) Vis possibly also the projection? (hvis should perhaps be hview?)

Schroedingers-Hat commented 13 years ago

Other conventions: Matrix multiplication has the matrix on the right. Hasn't mattered until now because boost is symmetric, and I hand coded the rotation matrices (only reverses the direction of rotation anyway) This seems to be the convention in computer graphics (and by extension glMatrix).

One other point to note if it comes up: There is no distinction between covariant and contravariant vectors. We're only dealing with flat space so it shouldn't matter. The only other thing I can think of where it might come up is EM in anisotropic matter (even then I"m not sure), but that shouldn't come up either.