From f989bf9e4778896823f5c204420b40538d582bcf Mon Sep 17 00:00:00 2001 From: Florian Stecker Date: Fri, 19 Jan 2024 17:18:14 -0600 Subject: [PATCH] some changes from visit at Austin --- README.md | 3 --- draw.c | 9 +++++---- linalg.h | 2 +- main.c | 13 ++++++++++++- main.h | 2 +- 5 files changed, 19 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 8e19ed7..818021b 100644 --- a/README.md +++ b/README.md @@ -42,12 +42,9 @@ Drag the mouse to move the image, drag with Shift pressed to rotate. | B | show the "boxes" used to approximate the limit curve | | p | save a screenshot of the current image (in PDF format) | | t | toggle info text | -| | | | i | (print some info to terminal?) | | x | (show rotated reflectors?) | | M | (make a movie) | -| | | - [Cairo]: https://cairographics.org/ [Gnu Scientific Library (GSL)]: https://www.gnu.org/software/gsl/ diff --git a/draw.c b/draw.c index 7db3e3e..60b8078 100644 --- a/draw.c +++ b/draw.c @@ -96,7 +96,7 @@ void drawPoint(DrawingContext *ctx, point_t p) cairo_t *C = ctx->cairo; cairo_save(C); - cairo_arc(C, p.x, p.y, 3.0/ctx->dim->scalefactor, 0, 2*M_PI); + cairo_arc(C, p.x, p.y, 4.0/ctx->dim->scalefactor, 0, 2*M_PI); cairo_close_path(C); cairo_fill(C); cairo_restore(C); @@ -558,7 +558,8 @@ void drawAttractors(DrawingContext *ctx) fixedPoints(ctx, "abc", p[0]); fixedPoints(ctx, "bca", p[1]); fixedPoints(ctx, "cab", p[2]); - fixedPoints(ctx, "a cab a", p[3]); + // fixedPoints(ctx, "abacacbabc", p[3]); + // fixedPoints(ctx, "abcabcabcabcab", p[3]); fixedPoints(ctx, "b abc b", p[4]); fixedPoints(ctx, "c bca c", p[5]); @@ -759,6 +760,7 @@ void drawBoxes2(DrawingContext *ctx) if(ctx->mode == 6) { cairo_set_source_rgb(C, 0, 0.8, 0.5); + drawCurvedBox(ctx, 'C', "ababab", 2); drawCurvedBox(ctx, 'C', "abababab", 2); drawCurvedBox(ctx, 'C', "ababababab", 2); } @@ -1109,7 +1111,6 @@ void draw(DrawingContext *ctx) if(ctx->show_marking) { cairo_set_source_rgb(C, 0, 0, 1); - // drawPoint(ctx, ctx->marking); } if(ctx->show_coxeter_orbit) @@ -1119,7 +1120,7 @@ void draw(DrawingContext *ctx) cairo_identity_matrix(C); // text is in screen coordinates if(ctx->show_text) - // drawText(ctx); + drawText(ctx); cairo_surface_flush(cairo_get_target(C)); } diff --git a/linalg.h b/linalg.h index f2d9bbe..89e74c8 100644 --- a/linalg.h +++ b/linalg.h @@ -13,7 +13,7 @@ #define ERROR(condition, msg, ...) if(condition){fprintf(stderr, msg, ##__VA_ARGS__); exit(1);} #define FCMP(x, y) gsl_fcmp(x, y, 1e-10) -#define MAX_TEMP_MATRICES 600000 +#define MAX_TEMP_MATRICES 1200000 #define MAX_TEMP_VECTORS 100 typedef struct _workspace { diff --git a/main.c b/main.c index 3803ced..81b7d31 100644 --- a/main.c +++ b/main.c @@ -350,6 +350,7 @@ int processEvent(GraphicsInfo *info, XEvent *ev) printf("Finished drawing %s\n", filename); } */ + /* screen_context->limit_with_lines = 0; double parameter_start = screen_context->parameter; for(int i = 0; i <= 1300; i++) { @@ -366,7 +367,17 @@ int processEvent(GraphicsInfo *info, XEvent *ev) cairo_surface_write_to_png(info->buffer_surface, filename); printf("Finished drawing %s\n", filename); } - + */ + screen_context->limit_with_lines = 0; + for(int i = 0; i <= 1000; i++) { + screen_context->parameter = exp(log(3.0)*((double)i/500-1)); + updateMatrices(screen_context); + computeLimitCurve(screen_context); + draw(screen_context); + sprintf(filename, "output/movie8/test%04d.png", i); + // cairo_surface_write_to_png(info->buffer_surface, filename); + printf("Finished drawing %s\n", filename); + } case 'f': TOGGLE(screen_context->use_repelling); computeLimitCurve(screen_context); diff --git a/main.h b/main.h index 9829f45..79c6cbd 100644 --- a/main.h +++ b/main.h @@ -11,7 +11,7 @@ #define ERROR(condition, msg, ...) if(condition){fprintf(stderr, msg, ##__VA_ARGS__); exit(1);} #define LOOP(i) for(int i = 0; i < 3; i++) -#define NUM_GROUP_ELEMENTS 50000 +#define NUM_GROUP_ELEMENTS 10000 typedef struct { double x[3];