From a131ff6da1dc91bdfaafb5ba036efb79ed8ace25 Mon Sep 17 00:00:00 2001 From: PedroEdiaz Date: Fri, 18 Oct 2024 10:27:38 -0600 Subject: [PATCH] Fix: Torus --- src/surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/surface.c b/src/surface.c index 457c099..12da109 100644 --- a/src/surface.c +++ b/src/surface.c @@ -23,7 +23,7 @@ void mobius(float *d_surface, int i, int j, int grid_size) void toro(float *d_surface, int i, int j, int grid_size) { float u = (2*M_PI) * ((float)i/(grid_size) ); - float v = (2*WIDTH) * ((float)j ); + float v = (1*WIDTH) * ((float)j ); d_surface[0] = (1 + 0.5*cos(v))*cos(u); d_surface[1] = (1 + 0.5*cos(v)) * sin(u);