From 623fee395425ab33f14fb9cd8ffa790e362f59d7 Mon Sep 17 00:00:00 2001 From: Julian T Date: Fri, 21 Feb 2020 06:55:27 +0100 Subject: Added pgm drawing and got light ray tracing working Still needs correct light simulation and reflections --- viewpoint.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'viewpoint.c') diff --git a/viewpoint.c b/viewpoint.c index d51e646..7786c12 100644 --- a/viewpoint.c +++ b/viewpoint.c @@ -4,7 +4,7 @@ #include #include -static const vector_t up = {0, 1, 0}; +static const vector_t up = {0, 0, 1}; void viewpoint_init(viewpoint_t *view) { @@ -37,10 +37,12 @@ void viewpoint_init(viewpoint_t *view) vector_sub(&view->blc, &view->blc, vector_scale(&v, &v, gy)); // Debug print + /* printf("Calculated the following viewpoint stuff\n"); printf("qx"); vector_print(&view->qx); printf("qy"); vector_print(&view->qy); printf("blc"); vector_print(&view->blc); + */ } // Calculate ray for viewport w, h -- cgit v1.2.3