This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let x(t) = distance from dest on x | |
let y(t) = distance from dest on y | |
let z(t) = distance from dest on z | |
let r(t)^2 = x(t)^2 + y(t)^2 + z(t)^2 | |
let f(t) = force | |
x(0) initial condition | |
y(0) initial condition | |
z(0) initial condition | |
f(t) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a(0) | |
b(0) | |
a(t) = (b(t) - a(0))t + a(0) | |
b(t) = (a(t) - b(0))t + b(0) | |
a(t) = (((a(t) - b(0))t + b(0)) - a(0))t + a(0) | |
a(t) = t^2 (a(t) - b(0)) + t (b(0) - a(0)) + a(0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Assumptions: Start at 0, time = t goes from 0 to 1 | |
let b = end of move action | |
let c = end of 1st SetPoint3Action | |
let d = end of 2nd SetPoint3Action | |
let e = end of 3rd SetPoint3Action | |
let d(t) = (e-d)t + d | |
let c(t) = (d(t) - c)t + c | |
let b(t) = (c(t) - b)t + b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let a = start position | |
let b = end position | |
p(t) = (b-a)t + a | |
let d = SetMove3Action's end point | |
p(t) = ((d-b)t+b)t + a = (dt - bt + b)t + a = (d-b)t^2 + bt + a | |
let d = 0, then p(t) = -bt^2 + bt + a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "5000 EXP Trophy", | |
"id": "5000exp", | |
"url": "/dbobjects/5000/5000exp.wrl", | |
"position": {"x": 0.0, "y": 1.75, "z": 0.0}, | |
"rotation": {"x": 0.0, "y": 1.0, "z": 0.0, "angle": 0.0} | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This code is NOT spec compliant: An RGB texture can be mistaken for an intensity texture if all its pixels happen to be gray. | |
// I suspect this will not particularly affect a lot of textures, but it is a possibility | |
// This also needs to check all URLs rather than the first, preferably the same way X3DOM does if possible | |
// Also better error handling | |
function fixGray(imageTexture) { | |
var url = imageTexture.getFieldValue("url")[0]; | |
var img = new Image(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* DNA.cpp | |
* | |
* This automata was designed by Christopher G. Langton at the University | |
* of Michigan, and is described in his article "Self-Reproduction in | |
* Cellular Automata", published in the book "Cellular Automata" in 1984. | |
* | |
* As described in the above article, this automata is "realistic" and | |
* "non-trivial", in the following ways: | |
* | |
* The reproduction is not simply due to the particular rules used in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdarg.h> | |
#include <dos.h> | |
#include <i86.h> | |
#include <conio.h> | |
#include "vfx1.h" | |
extern unsigned _psp; | |
unsigned __far *psp_pointer; | |
unsigned _get_memsize(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void rawToEulerInt(long rawMagneticX,long rawMagneticY,long rawMagneticZ, | |
long rawGravimetricX,long rawGravimetricY, | |
long * eulerYaw,long * eulerPitch,long * eulerRoll) { | |
vec3 rotMagnetic; | |
vec2 linGravimetric; | |
vec2 normRotMag; | |
sinCos pitch,roll; | |
#ifdef USE_FILTERS | |
if (!madeFilters) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def prim(name, default, actions): | |
action_string = ", ".join(actions) | |
if default: | |
animate_string = ", animate me . 1 1 0" | |
else: | |
animate_string = "" | |
print("create name %s%s; adone %s" % (name, animate_string, action_string)) | |
def action_prim_mem(name, value): | |
action_string = "animate %s . 1 1 %s" % (name, ("0" if value else "2147483647")) |