some changes from visit at Austin

This commit is contained in:
Florian Stecker 2024-01-19 17:18:14 -06:00
parent 370777535f
commit f989bf9e47
5 changed files with 19 additions and 10 deletions

View File

@ -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 | | B | show the "boxes" used to approximate the limit curve |
| p | save a screenshot of the current image (in PDF format) | | p | save a screenshot of the current image (in PDF format) |
| t | toggle info text | | t | toggle info text |
| | |
| i | (print some info to terminal?) | | i | (print some info to terminal?) |
| x | (show rotated reflectors?) | | x | (show rotated reflectors?) |
| M | (make a movie) | | M | (make a movie) |
| | |
[Cairo]: https://cairographics.org/ [Cairo]: https://cairographics.org/
[Gnu Scientific Library (GSL)]: https://www.gnu.org/software/gsl/ [Gnu Scientific Library (GSL)]: https://www.gnu.org/software/gsl/

9
draw.c
View File

@ -96,7 +96,7 @@ void drawPoint(DrawingContext *ctx, point_t p)
cairo_t *C = ctx->cairo; cairo_t *C = ctx->cairo;
cairo_save(C); 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_close_path(C);
cairo_fill(C); cairo_fill(C);
cairo_restore(C); cairo_restore(C);
@ -558,7 +558,8 @@ void drawAttractors(DrawingContext *ctx)
fixedPoints(ctx, "abc", p[0]); fixedPoints(ctx, "abc", p[0]);
fixedPoints(ctx, "bca", p[1]); fixedPoints(ctx, "bca", p[1]);
fixedPoints(ctx, "cab", p[2]); 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, "b abc b", p[4]);
fixedPoints(ctx, "c bca c", p[5]); fixedPoints(ctx, "c bca c", p[5]);
@ -759,6 +760,7 @@ void drawBoxes2(DrawingContext *ctx)
if(ctx->mode == 6) { if(ctx->mode == 6) {
cairo_set_source_rgb(C, 0, 0.8, 0.5); cairo_set_source_rgb(C, 0, 0.8, 0.5);
drawCurvedBox(ctx, 'C', "ababab", 2);
drawCurvedBox(ctx, 'C', "abababab", 2); drawCurvedBox(ctx, 'C', "abababab", 2);
drawCurvedBox(ctx, 'C', "ababababab", 2); drawCurvedBox(ctx, 'C', "ababababab", 2);
} }
@ -1109,7 +1111,6 @@ void draw(DrawingContext *ctx)
if(ctx->show_marking) if(ctx->show_marking)
{ {
cairo_set_source_rgb(C, 0, 0, 1); cairo_set_source_rgb(C, 0, 0, 1);
// drawPoint(ctx, ctx->marking);
} }
if(ctx->show_coxeter_orbit) if(ctx->show_coxeter_orbit)
@ -1119,7 +1120,7 @@ void draw(DrawingContext *ctx)
cairo_identity_matrix(C); // text is in screen coordinates cairo_identity_matrix(C); // text is in screen coordinates
if(ctx->show_text) if(ctx->show_text)
// drawText(ctx); drawText(ctx);
cairo_surface_flush(cairo_get_target(C)); cairo_surface_flush(cairo_get_target(C));
} }

View File

@ -13,7 +13,7 @@
#define ERROR(condition, msg, ...) if(condition){fprintf(stderr, msg, ##__VA_ARGS__); exit(1);} #define ERROR(condition, msg, ...) if(condition){fprintf(stderr, msg, ##__VA_ARGS__); exit(1);}
#define FCMP(x, y) gsl_fcmp(x, y, 1e-10) #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 #define MAX_TEMP_VECTORS 100
typedef struct _workspace { typedef struct _workspace {

13
main.c
View File

@ -350,6 +350,7 @@ int processEvent(GraphicsInfo *info, XEvent *ev)
printf("Finished drawing %s\n", filename); printf("Finished drawing %s\n", filename);
} }
*/ */
/*
screen_context->limit_with_lines = 0; screen_context->limit_with_lines = 0;
double parameter_start = screen_context->parameter; double parameter_start = screen_context->parameter;
for(int i = 0; i <= 1300; i++) { 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); cairo_surface_write_to_png(info->buffer_surface, filename);
printf("Finished drawing %s\n", 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': case 'f':
TOGGLE(screen_context->use_repelling); TOGGLE(screen_context->use_repelling);
computeLimitCurve(screen_context); computeLimitCurve(screen_context);

2
main.h
View File

@ -11,7 +11,7 @@
#define ERROR(condition, msg, ...) if(condition){fprintf(stderr, msg, ##__VA_ARGS__); exit(1);} #define ERROR(condition, msg, ...) if(condition){fprintf(stderr, msg, ##__VA_ARGS__); exit(1);}
#define LOOP(i) for(int i = 0; i < 3; i++) #define LOOP(i) for(int i = 0; i < 3; i++)
#define NUM_GROUP_ELEMENTS 50000 #define NUM_GROUP_ELEMENTS 10000
typedef struct { typedef struct {
double x[3]; double x[3];