 	int cores = 1;
 	int blocks = 1;
 	float dt = 1/2.0;
-	float4 startloc = {200,125,128,128};
+	float4 startloc = {1,-1,0,0};
 	checkCudaErrors(cudaMalloc(&d_lines,blocks*cores*steps*sizeof(float4)));
 
 	h_lines = (float4*) malloc(blocks*cores*steps*sizeof(float4));

texture <float4, cudaTextureType3D, cudaReadModeElementType> dataTex;

const int N = 256;


//Definitions of vectortype operators


//Do 1 RK4 step.
__device__ float4 RK4step(float4 loc, double dt ) {
	float3 loc3d = make_float3((loc.x-origin)/spacing,(loc.y-origin)/spacing,(loc.z-origin)/spacing);
	float4 k1 = tex3D(dataTex, loc3d);
	float4 k2 = tex3D(dataTex, loc3d+(dt*0.5/spacing)*make_float3(k1));
	float4 k3 = tex3D(dataTex, loc3d+(dt*0.5/spacing)*make_float3(k2));
	float4 k4 = tex3D(dataTex, loc3d+(dt/spacing)*make_float3(k3));
	return dt/6.0*(k1 + 2.0*(k2 + k3) + k4);
}

