mobius static method

void mobius(
  1. double u,
  2. double t,
  3. Vector3 target
)

Implementation

static void mobius(double u,double t, Vector3 target ) {

	// flat mobius strip
	// http://www.wolframalpha.com/input/?i=M%C3%B6bius+strip+parametric+equations&lk=1&a=ClashPrefs_*Surface.MoebiusStrip.SurfaceProperty.ParametricEquations-
	u = u - 0.5;
	final v = 2 * math.pi * t;

	const a = 2;

	final x = math.cos( v ) * ( a + u * math.cos( v / 2 ) );
	final y = math.sin( v ) * ( a + u * math.cos( v / 2 ) );
	final z = u * math.sin( v / 2 );

	target.setValues( x, y, z );
}