Advertisement

Falloff

Started by October 17, 2024 09:17 PM
76 comments, last by taby 1 week, 1 day ago

Haha flat gravitators!

Well, the thing is, it would be optimal if they could generate anisotropic gravity in human-scale systems. Basically, try to get rid of pressure by lowering the temperate of the test bodies, to see if there is a discrepancy between Newton's gravity and anisotropic gravity. I am assuming that the flattening of the emitter occurs because the gravitating process has some finite number of gravitational degrees of freedom.

Also, if the galactic rotation curve was actually flat, then only G would run. However, it is not quite flat (see image below), so there is likely something extra at work here… for instance, the alignment of the gravitational degrees of freedom.

https://upload.wikimedia.org/wikipedia/commons/c/cd/Rotation_curve_of_spiral_galaxy_Messier_33_%28Triangulum%29.png

Advertisement

Well, there is something they call ‘gravitational friction’ iirc. It causes to lock moon rotation to earth rotation, since a realtive rotation would apply minor stress to the matter, so it syncs to avoid the stress.

Maybe they forgot to consider this when they calculated their expectation. :D

It’s hard to say.

So far I get a random unit vector, and then SLERP it to a disk depending on the fractional dimension. This produces a uniform distribution on the ellipsoid’s surface. Now all I have to do is get the normals based on the inverse shape, and I’ll be golden.

Ok, it’s all working now. I am no longer calculating that (anti)parallelity.

I’ll post details tonight or tomorrow.

Here is a spheroidal emitter (D = 3) on left. On right is an invisible sphere, where the line segments end.

D = 2.5:

D = 2.001:

Thanks for your time and insight JoeJ, once again!

Advertisement

P.S. The C++ / OpenGL 1.x code is at: https://github.com/sjhalayka/ellipsoid_emitter

OK, here's the code. I'm not sure where to go from here:

int main(int argc, char** argv)
{
	cout << setprecision(20) << endl;
	srand(0);

	double dimension = 2.5;
	const size_t n = 10000000;

	if (dimension <= 2)
		dimension = 2.001;
	else if (dimension > 3)
		dimension = 3;

	const double disk_like = 3 - dimension;
	const double falloff_exponent = 2 - disk_like;

	// Start with pseudorandom oscillator locations
	for (size_t i = 0; i < n; i++)
		threeD_oscillators.push_back(RandomUnitVector());

	// Spread the oscillators out, so that they are distributed evenly across
	// the surface of the ellipsoid emitter
	for (size_t i = 0; i < n; i++)
	{
		vector_3 ring;

		ring.x = threeD_oscillators[i].x;
		ring.y = 0;
		ring.z = threeD_oscillators[i].z;

		vector_3 s = slerp(threeD_oscillators[i], ring, disk_like);

		threeD_oscillators[i] = s;
	}

	// Get position on oblate ellipsoid
	for (size_t i = 0; i < n; i++)
	{
		vector_3 vec = threeD_oscillators[i];

		const vector_4 rv = RayEllipsoid(vector_3(0, 0, 0), vec, vector_3(1.0, 1.0 - disk_like, 1.0));

		threeD_oscillators[i] = vector_3(rv.y, rv.z, rv.w);
	}

	// Get position and normal on prolate ellipsoid
	for (size_t i = 0; i < n; i++)
	{
		vector_3 vec = threeD_oscillators[i];

		const vector_4 rv = RayEllipsoid(vector_3(0, 0, 0), vec, vector_3(1.0 - disk_like, 1.0, 1.0 - disk_like));

		vector_3 collision_point = vector_3(rv.y, rv.z, rv.w);

		vector_3 normal = EllipsoidNormal(collision_point, vector_3(1.0 - disk_like, 1.0, 1.0 - disk_like));

		normals.push_back(normal);

		line_segment_3 ls;
		ls.start = threeD_oscillators[i];
		ls.end = threeD_oscillators[i] + normals[i] * 1e30;

		threeD_line_segments.push_back(ls);
	}

	// Get intersecting lines
	const double start_distance = 10;
	const double end_distance = 10000;

	const size_t resolution = 100000;

	const double step_size = (end_distance - start_distance) / (resolution - 1);

	for (double r = start_distance; r <= end_distance; r += step_size)
	{
		vector_3 receiver_pos(r, 0, 0);
		size_t collision_count = get_intersecting_line_segments(receiver_pos, 1.0, dimension);

		cout << collision_count * pow(receiver_pos.x, falloff_exponent) << endl;
	}

	return 0;
}

Basically, the value collision_count * pow(receiver_pos.x, falloff_exponent) is constant where D = 3.0 and D = 2.001. For D = 2.5, it is not constant.

Well, I decided to try making the radius r = 100 constant, and run the dimension D from 2.001 to 3.0. It forms a nice little curve:

#include "main.h"


int main(int argc, char** argv)
{
	cout << setprecision(20) << endl;
	srand(0);

	const double start_dim = 2.001;
	const double end_dim = 3;

	const size_t dim_res = 100;

	const double dim_step_size = (end_dim - start_dim) / (dim_res - 1);

	for (double D = start_dim; D <= end_dim; D += dim_step_size)
	{
		threeD_oscillators.clear();
		normals.clear();
		threeD_line_segments.clear();
		threeD_line_segments_intersected.clear();

		const size_t n = 1000000;// c_meters* c_meters;

		//if (dimension <= 2)
		//	dimension = 2.001;
		//else if (dimension > 3)
		//	dimension = 3;

		const double disk_like = 3 - D;
		const double falloff_exponent = 2 - disk_like;

		// Start with pseudorandom oscillator locations
		for (size_t i = 0; i < n; i++)
		{
			vector_3 r = RandomUnitVector();
			threeD_oscillators.push_back(r);
		}

		// Spread the oscillators out, so that they are distributed evenly across
		// the surface of the ellipsoid emitter
		for (size_t i = 0; i < n; i++)
		{
			vector_3 ring;

			ring.x = threeD_oscillators[i].x;
			ring.y = 0;
			ring.z = threeD_oscillators[i].z;

			vector_3 s = slerp(threeD_oscillators[i], ring, disk_like);

			threeD_oscillators[i] = s;
		}

		// Get position on oblate ellipsoid
		for (size_t i = 0; i < n; i++)
		{
			vector_3 vec = threeD_oscillators[i];

			const vector_4 rv = RayEllipsoid(vector_3(0, 0, 0), vec, vector_3(1.0, 1.0 - disk_like, 1.0));

			threeD_oscillators[i] = vector_3(rv.y, rv.z, rv.w);
		}

		// Get position and normal on prolate ellipsoid
		for (size_t i = 0; i < n; i++)
		{
			const vector_4 rv = RayEllipsoid(vector_3(0, 0, 0), threeD_oscillators[i], vector_3(1.0 - disk_like, 1.0, 1.0 - disk_like));

			vector_3 collision_point = vector_3(rv.y, rv.z, rv.w);

			vector_3 normal = EllipsoidNormal(collision_point, vector_3(1.0 - disk_like, 1.0, 1.0 - disk_like));

			normals.push_back(normal);

			line_segment_3 ls;
			ls.start = threeD_oscillators[i];
			ls.end = threeD_oscillators[i] + normals[i];// *1e30;

			threeD_line_segments.push_back(ls);
		}

		vector_3 receiver_pos(10, 0, 0);
		size_t collision_count = get_intersecting_line_count(receiver_pos, 1.0, D, true);

		cout << D << " " << collision_count << endl;
	}

	return 0;
}

The more fractional the dimension, the less fractal the curve:

#include "main.h"


int main(int argc, char** argv)
{
	cout << setprecision(20) << endl;
	srand(0);

	const double start_dim = 2.001;
	const double end_dim = 3;

	const size_t dim_res = 3;

	const double dim_step_size = (end_dim - start_dim) / (dim_res - 1);

	for (double D = start_dim; D <= end_dim; D += dim_step_size)
	{
		threeD_oscillators.clear();
		normals.clear();
		threeD_line_segments.clear();
		threeD_line_segments_intersected.clear();

		const size_t n = 1000000;

		//if (dimension <= 2)
		//	dimension = 2.001;
		//else if (dimension > 3)
		//	dimension = 3;

		const double disk_like = 3 - D;
		const double falloff_exponent = 2 - disk_like;

		// Start with pseudorandom oscillator locations
		for (size_t i = 0; i < n; i++)
		{
			vector_3 r = RandomUnitVector();
			threeD_oscillators.push_back(r);
		}

		// Spread the oscillators out, so that they are distributed evenly across
		// the surface of the ellipsoid emitter
		for (size_t i = 0; i < n; i++)
		{
			vector_3 ring;

			ring.x = threeD_oscillators[i].x;
			ring.y = 0;
			ring.z = threeD_oscillators[i].z;

			vector_3 s = slerp(threeD_oscillators[i], ring, disk_like);

			threeD_oscillators[i] = s;
		}

		// Get position on oblate ellipsoid
		for (size_t i = 0; i < n; i++)
		{
			vector_3 vec = threeD_oscillators[i];

			const vector_4 rv = RayEllipsoid(vector_3(0, 0, 0), vec, vector_3(1.0, 1.0 - disk_like, 1.0));

			threeD_oscillators[i] = vector_3(rv.y, rv.z, rv.w);
		}

		// Get position and normal on prolate ellipsoid
		for (size_t i = 0; i < n; i++)
		{
			const vector_4 rv = RayEllipsoid(vector_3(0, 0, 0), threeD_oscillators[i], vector_3(1.0 - disk_like, 1.0, 1.0 - disk_like));

			vector_3 collision_point = vector_3(rv.y, rv.z, rv.w);

			vector_3 normal = EllipsoidNormal(collision_point, vector_3(1.0 - disk_like, 1.0, 1.0 - disk_like));

			normals.push_back(normal);

			line_segment_3 ls;
			ls.start = threeD_oscillators[i];
			ls.end = threeD_oscillators[i] + normals[i];// *1e30;

			threeD_line_segments.push_back(ls);
		}

		//vector_3 receiver_pos(10, 0, 0);
		//size_t collision_count = get_intersecting_line_count(receiver_pos, 1.0, dimension, false);


		string filename = to_string(D) + ".txt";

		ofstream out_file(filename.c_str());

		//// Get intersecting lines
		const double start_distance = 10;
		const double end_distance = 100;

		const size_t distance_res = 100;

		const double distance_step_size = (end_distance - start_distance) / (distance_res - 1);

		for (double r = start_distance; r <= end_distance; r += distance_step_size)
		{
			vector_3 receiver_pos(r, 0, 0);

			size_t collision_count = get_intersecting_line_count(receiver_pos, 1.0, D, true);

			// todo: get gradient of collision count at r

			cout << "D " << D << " " << r << " " << collision_count * pow(receiver_pos.x, falloff_exponent) << endl;

			out_file << r << " " << collision_count * pow(receiver_pos.x, falloff_exponent) << endl;
		}

		out_file.close();




		//vector_3 receiver_pos(100, 0, 0);

		//size_t collision_count = get_intersecting_line_count(receiver_pos, 1.0, D, true);

		//cout << D << " " << collision_count << endl;
	}

	return 0;
}
Advertisement