Post by Chris M. ThomassonJust a little plot I did for Moebius and WM using unit fractions on any
line in n-ary space. 3d here...
https://i.ibb.co/9n71tZf/ct-pov.png
https://i.ibb.co/0hXnPpf/ct-pov.png
_______________________
void
ct_unit_fractions(
ct::pov::pov_file& scene,
vector_field& field,
glm::vec3 p0,
glm::vec3 p1,
unsigned long n
) {
glm::vec3 pdif = p1 - p0;
glm::vec3 pperp = { pdif.y, pdif.x, pdif.z };
scene.dump_cylinder(p0, p1, .01, { 1, 0, 0 });
for (unsigned long i = 1; i < n + 1; ++i)
{
float normal = 1.f / i;
glm::vec3 c0 = p0 + pdif * normal;
glm::vec3 c0_perp0 = c0 + pperp * normal;
glm::vec3 c0_perp1 = c0 - pperp * normal;
scene.dump_sphere(c0, .02, { normal, 1 - normal, 1 });
scene.dump_cylinder(c0, c0_perp0, .01, { 1, 1, 0 });
scene.dump_cylinder(c0, c0_perp1, .01, { 1, 0, 1 });
}
}
_______________________