craytracinggeometry-surfacecartesian-coordinatesmobius

It is possible to render a mobius strip with a raytracer?


In my raytracer all surfaces are centered at the origin and oriented on Y axis. Displacement, rotations and resizing are obtained through transformation matrix applied on rays.

I recently rendered a torus in my ray-tracing using its Cartesian equation:

(x^2 + y^2 + z^2)^2 - 2 * (r1^2 + r2^2) * (x^2 + y^2 + z^2) + 4 * r1^2 * y^2 + (r1^2 - r2^2)^2

to which I replaced every point with the ray equation:

ex: X = Ray.ori.x + T * Ray.dir.x;

With the ray components replaced in the equation, I got the 5 coefficients of my quartic function which can be used to find the equation roots (the T intersections) with a 4th degree polynomial solver algorithm.

I was wondering if a mobius strip can be rendered the same way. My research did not bring up much, I found some Raytracing codes using cubic equations but copying the 4 coefficients led me to incomprehensible forms and artifacts.

Could you help me to render it? Also advice to render it with another method is welcome.

Thanks!


Solution

  • Yes it is possible to render a mobius strip with a raytracer.

    mobius